book_4_sparkGenerated
code_blocksInput

Description

The r field represents the red color component of a Color32 structure. It is a byte value ranging from 0 to 255, where 0 indicates no red component and 255 indicates full red intensity.

Usage

To access or modify the red component of a Color32 instance, you can directly use the r field. This field is public and non-static, meaning it is accessed through an instance of Color32.

Example

// Example of using the 'r' field in Color32
Color32 color = new Color32();
color.r = 128; // Set the red component to a medium intensity

// Accessing the red component
byte redComponent = color.r;
// redComponent now holds the value 128