Color32
- Namespace: Turian.Engine.Core
- Source File: Color32.cs
A deterministic packed sRGB color for UI rendering, serialization and native interop. The packed value is 0xRRGGBBAA; RGB bytes are sRGB encoded and alpha is linear.
Fields
Rgba (uint): The packed 0xRRGGBBAA value.
Properties
R
(byte): The sRGB-encoded red channel.
G
(byte): The sRGB-encoded green channel.
B
(byte): The sRGB-encoded blue channel.
A
(byte): The linear alpha channel.
Public Methods
FromHex
public static Color32 FromHex(string value)
Parses RRGGBB, RRGGBBAA, #RRGGBB or #RRGGBBAA.
Parameters:
value(string)
Returns: Color32
ToHex
public string ToHex()
Formats this color as #RRGGBBAA.
Returns: string