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 is useful for determining if a color is within the typical range used for most color representations in digital media.

Usage

To use the IsSdr property, simply access it on an instance of the Color struct. It returns a boolean value:

Color myColor = new Color(0.5f, 0.5f, 0.5f, 1.0f);
bool isSdr = myColor.IsSdr;

In this example, isSdr will be true because all components of myColor are within the 0 to 1 range.

Example

Color color = new Color(0.8f, 0.6f, 0.4f, 1.0f);
if (color.IsSdr)
{
    // Perform operations knowing the color is within SDR range
    // For example, use it in a context that requires SDR colors
}