bool IsHdr { get; set; }

robot_2Generated
code_blocksInput

Description

The IsHdr property of the Color struct indicates whether the color is in High Dynamic Range (HDR). It returns true if any of the color components (red, green, blue, or alpha) exceed the value of 1. This property is useful for determining if a color is outside the standard range of 0 to 1, which is typical for HDR colors.

Usage

To use the IsHdr property, simply access it on an instance of the Color struct. It will return a boolean value indicating whether the color is HDR.

Example

Color color = new Color(1.5f, 0.5f, 0.5f, 1.0f);
bool isHdr = color.IsHdr;
// isHdr will be true because the red component exceeds 1.