Argb32Color class
Argb32Color class
Represents 32-bit color in ARGB format, with 8 bits per every channel (Alpha, Red, Green, Blue). Supports transparency.
The Argb32Color type exposes the following members:
Constructors
| Constructor | Description |
|---|---|
| init | Constructs a new instance of Argb32Color |
Properties
| Property | Description |
|---|---|
| value | Gets the Int32 value of the color as 32-bit signed integer |
| a | Gets the alpha part of the color as 8-bit unsigned integer [0..255] |
| alpha | Gets the alpha part of the color in percent in (0..1) range. |
| 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_empty | Indicates whether this Argb32Color color instance is uninitialized - all 4 channels are set to 0. Same as Default and Transparent. Same as Argb32Color.IsDefault |
| is_fully_transparent | Indicates whether this Argb32Color instance is fully transparent - its Alpha channel has the min (0) value, so other R, G, and B channels has no visible effect. |
| is_translucent | Indicates whether this Argb32Color instance is translucent (not fully transparent, but also not fully opaque) |
| is_fully_opaque | Indicates whether this Argb32Color instance is fully opaque, without transparency (its Alpha channel has max value) |
| EMPTY | Returns an empty color, which has no channels info and is fully transparent. Same as ‘Argb32Color.Transparent’. Default value. |
| TRANSPARENT | Fully transparent empty color. The same as default ‘Argb32Color.Empty’ color value. |
Methods
| Method | Description |
|---|---|
| from_other_with_alpha | Creates a new Argb32Color instance from specified, but with re-defined alpha (opacity) value |
| from_other_with_alpha | Creates a new Argb32Color instance from specified Rgb24Color, but with specified alpha (opacity) value |
| equals | Checks this color with specified Argb32Color color for equality |
| equals | Checks this color with specified Rgb24Color color for equality |
| from_rgba | Creates one Argb32Color value from specified Red, Green, Blue, and Alpha channels |
| from_argb | Creates a Argb32Color instance from its 32-bit component (alpha, red, green, and blue) values, compatible with value, produced by the System.Drawing.Color.ToArgb() method |
| from_rgb | Creates one Argb32Color value from specified Red, Green, Blue channels, while Alpha channel is fully opaque |
| from_single_value_rgb | Creates a fully opaque (A=255) color from single value, which will be applied to all channels |
| get_brightness | Returns the Hue-Saturation-Lightness (HSL) lightness/brightness for this Argb32Color instance. |
| get_hue | Returns the Hue-Saturation-Lightness (HSL) hue value, in degrees, for this Argb32Color 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 Argb32Color instance |
| to_argb | Returns the ARGB value of this Argb32Color instance, compatible with System.Drawing.Color.ToArgb() method |
| to_rgba | Serializes this Argb32Color instance to the ‘rgba’ CSS function notation |
| to_rgb | Serializes this Argb32Color instance to the ‘rgb’ CSS function notation. Alpha channel of this color will be omitted during serialization. |
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