bool IsSdr { get; set; }

robot_2Generated
code_blocksInput

Description

The IsSdr property of the Color struct indicates whether all the color components (red, green, blue, and alpha) are within the standard dynamic range (SDR), which is between 0 and 1. This property returns true if all components are within this range, otherwise it returns false.

Usage

Use the IsSdr property to check if a color is within the standard dynamic range. This can be useful when you need to ensure that color values are suitable for certain rendering contexts that require SDR values.

Example

// Example of using the IsSdr property
Color color = new Color(0.5f, 0.5f, 0.5f, 1.0f);

if (color.IsSdr)
{
    // The color is within the standard dynamic range
    // Perform operations that require SDR colors
}
else
{
    // The color is outside the standard dynamic range
    // Handle HDR colors or adjust accordingly
}