Description
The RawInt
property of the Color
struct provides an integer representation of the color in the format 0xAABBGGRR
. This format is commonly used by native code for efficient color manipulation and storage. The property is marked with the JsonIgnore
attribute, indicating that it should not be serialized when using JSON serialization.
Usage
Use the RawInt
property when you need to interact with systems or APIs that require color data in a compact integer format. This is particularly useful for performance-critical applications where color data needs to be processed quickly.
Example
// Example of accessing the RawInt property
Color color = new Color(1.0f, 0.5f, 0.25f, 0.75f);
uint rawIntValue = color.RawInt;
// rawIntValue now holds the integer representation of the color in 0xAABBGGRR format