book_4_sparkGenerated
code_blocksInput

Description

The Color.b field represents the blue component of a color in the Color struct. It is a float value typically ranging from 0 to 1, where 0 represents no blue and 1 represents full blue intensity. However, this value can exceed the 0-1 range, allowing for high dynamic range (HDR) color representations.

Usage

To access or modify the blue component of a Color instance, use the b field directly. This field is public and non-static, meaning it is accessed through an instance of the Color struct.

Example

// Example of setting the blue component of a Color
Color myColor = new Color();
myColor.b = 0.5f; // Set the blue component to 50% intensity

// Example of getting the blue component of a Color
float blueIntensity = myColor.b;
// blueIntensity will be 0.5f