Rgb24Color class
Leave feedback
On this page
Represents 24-bit RGB color with 8 bits per channel (Red, Green, Blue) and no transparency.
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
The Rgb24Color type exposes the following members:
| Constructor | Description |
|---|---|
| init |
| Method | Description |
|---|---|
| equals | Determines whether this color is equal to the specified Argb32Color. |
| equals | Checks this color with specified Rgb24Color color for equality. |
| equals | Checks this color against the specified uncasted color. |
| equals_argb_32_color | |
| equals_object | |
| equals_rgb_24_color | |
| from_rgb | Creates a Rgb24Color value from the specified red, green, and blue channel values. |
| get_brightness | Returns the Hue‑Saturation‑Lightness (HSL) lightness/brightness for this Rgb24Color instance. |
| get_hash_code | Returns a hash code that defines the current color. Not compatible with System.Drawing.Color.GetHashCode. |
| get_hue | Returns the hue component of the color in the HSL color space, expressed in degrees. If the color is grayscale (R == G == B), the hue is undefined and the method returns 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 System.Drawing.Color. |
| to_hex | Returns this color in hexadecimal string representation. |
| to_rgb | Serializes this Rgb24Color instance to the ‘rgb’ CSS function notation. |
| to_string | Serializes this Rgb24Color instance to ‘rgb(r, g, b)’ format. |
| Property | Description |
|---|---|
| b | The blue component of the color as an 8-bit unsigned integer [0..255]. |
| g | The green component of the color as an 8-bit unsigned integer in the range 0..255. |
| is_default | The property indicates whether this Rgb24Color instance is the default (Black) – all three channels are set to 0. |
| r | The red component of the color as an 8-bit unsigned integer (0..255). |
- module
groupdocs.viewer.drawing
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.