bool IsRepresentableInHex { get; set; }

robot_2Generated
code_blocksInput

Description

Returns true if this color can be represented in hexadecimal format (#RRGGBB[AA]). This may not be the case if the color components are outside of the [0,1] range.

Usage

Use this property to determine if a Color instance can be accurately represented in a hexadecimal string format. This is useful when you need to serialize or display the color in a format that requires each component to be within the standard range.

Example

Color color = new Color(0.5f, 0.5f, 0.5f, 1.0f);
bool canRepresentInHex = color.IsRepresentableInHex;
// canRepresentInHex will be true because all components are within the [0,1] range.