Description
The RawInt
property of the Color32
struct provides an integer representation of the color in the format 0xAABBGGRR
. This format is typically used by native code to efficiently store and manipulate color data. The integer value encodes the alpha, blue, green, and red components of the color in a single 32-bit unsigned integer.
Usage
Use the RawInt
property when you need to interact with systems or APIs that require color data in the 0xAABBGGRR
format. This property is particularly useful for low-level graphics programming or when interfacing with native code that expects this specific color encoding.
Example
// Example of accessing the RawInt property
Color32 color = new Color32();
uint rawIntValue = color.RawInt;
// Example of setting the RawInt property
color.RawInt = 0xFF00FF00; // Sets the color to fully opaque green