Description
The RgbInt
property of the Color
struct provides an integer representation of the color in the format 0xRRGGBB
. This property is useful for scenarios where a compact integer representation of a color is needed, such as when interfacing with systems that require color data in this format.
Usage
To access the RgbInt
property, you need to have an instance of the Color
struct. This property is read-only and provides a UInt32
value representing the color's red, green, and blue components in a single integer.
Example
// Example of accessing the RgbInt property
Color color = new Color(1.0f, 0.5f, 0.0f, 1.0f); // Orange color
uint rgbInt = color.RgbInt;
// rgbInt now holds the integer representation of the color in 0xRRGGBB format