Struct ColorInt
Color, as int in 0xAARRGGBB format.
Can convert from/to System.Drawing.Color, System.Windows.Media.Color, int (0xAARRGGBB), Windows COLORREF (0xBBGGRR), string.
public record struct ColorInt : IEquatable<ColorInt>
Namespace: Au.Types
Assembly: Au.dll
Constructors
| Name | Description |
|---|---|
| ColorInt(int, bool?) | |
| ColorInt(uint, bool?) |
Fields
| Name | Description |
|---|---|
| argb | Color value in |
Methods
| Name | Description |
|---|---|
| FromBGR(int, bool?) | Converts from Windows native COLORREF ( |
| FromHLS(int, int, int, bool) | Converts from hue-luminance-saturation (HLS). |
| FromString(string, out ColorInt) | Converts from a color name (System.Drawing.Color.FromName) or string |
| GetPerceivedBrightness(int, bool) | Calculates color's perceived brightness. |
| SwapRB(int) | Converts color from ARGB ( |
| SwapRB(uint) | Converts color from ARGB ( |
| ToBGR(bool) | Converts to Windows native COLORREF ( |
| ToHLS(int, bool) | Converts to hue-luminance-saturation (HLS). |
| ToString() |
Operators
| Name | Description |
|---|---|
| explicit operator Color(ColorInt) | Converts to System.Drawing.Color. |
| explicit operator Color(ColorInt) | Converts to System.Windows.Media.Color. |
| implicit operator ColorInt(Color) | Converts from System.Drawing.Color. |
| implicit operator ColorInt(int) | Converts from an int color value in |
| implicit operator ColorInt(uint) | Converts from an uint color value in |
| implicit operator ColorInt(Color) | Converts from System.Windows.Media.Color. |