Rgb24Color class
Rgb24Color class
Represents 24-bit color in RGB format, with 8 bits per every channel (Red, Green, Blue). Does not support transparency.
The Rgb24Color type exposes the following members:
Constructors
| Constructor | Description |
|---|---|
| init | Constructs a new instance of Rgb24Color |
Properties
| Property | Description |
|---|---|
| r | Gets the red part of the color as 8-bit unsigned integer [0..255] |
| g | Gets the green part of the color as 8-bit unsigned integer [0..255] |
| b | Gets the blue part of the color as 8-bit unsigned integer [0..255] |
| is_default | Indicates whether this Rgb24Color instance is default (Black) - all 3 channels are set to 0. |
Methods
| Method | Description |
|---|---|
| equals | Checks this color with specified Argb32Color color for equality |
| equals | Checks this color with specified Rgb24Color color for equality |
| from_rgb | Creates one Rgb24Color value from specified Red, Green, Blue channels |
| get_brightness | Returns the Hue-Saturation-Lightness (HSL) lightness/brightness for this Rgb24Color instance. |
| get_hue | Returns the Hue-Saturation-Lightness (HSL) hue value, in degrees, for this Rgb24Color instance. If R == G == B, the hue is meaningless, and the return value is 0. |
| get_saturation | The Hue-Saturation-Lightness (HSL) saturation for this Rgb24Color instance |
| to_argb | Returns the ARGB value of this Rgb24Color instance, compatible with Color |
| to_rgb | Serializes this Rgb24Color instance to the ‘rgb’ CSS function notation. |
| to_hex | Returns this color in hexadecimal string representation |
Remarks
This type is designed to be useful for (but not limited to) CSS operations. See more: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
See Also
- module
groupdocs.viewer.drawing - class
Argb32Color - class
Rgb24Color