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.
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.
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 components to be within the standard range.
Color color = new Color(1.0f, 0.5f, 0.0f, 1.0f); bool canBeHex = color.IsRepresentableInHex; // canBeHex will be true if all components are within the [0,1] range.