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 is useful for determining if a color is outside the standard range of 0 to 1, which is typical for HDR colors.
Usage
Use the IsHdr
property to check if a color is in HDR. This can be particularly useful when working with graphics or rendering systems that support HDR, as it allows you to identify colors that may require special handling or processing.
Example
Color color = new Color(1.5f, 0.8f, 0.6f, 1.0f);
bool isHdr = color.IsHdr;
// isHdr will be true because the red component exceeds 1.