Description
The RgbaInt
property provides an integer representation of a color in the format 0xRRGGBBAA
. This format encodes the red, green, blue, and alpha components of a color into a single 32-bit unsigned integer, where each component is represented by 8 bits.
Usage
Use the RgbaInt
property when you need a compact integer representation of a color, for example, when interfacing with systems that require color data in this format. This property is read-only and is automatically calculated from the color's RGBA components.
Example
// Example of accessing the RgbaInt property
Color color = new Color(1.0f, 0.5f, 0.0f, 1.0f); // Orange color
uint rgbaInt = color.RgbaInt;
// rgbaInt now holds the integer representation of the color in 0xRRGGBBAA format