The Value
property of the ColorHsv
struct represents the brightness of the color. It is a floating-point value ranging from 0 to 1, where 0 indicates complete blackness and 1 indicates full brightness of the color.
The Value
property of the ColorHsv
struct represents the brightness of the color. It is a floating-point value ranging from 0 to 1, where 0 indicates complete blackness and 1 indicates full brightness of the color.
To access or modify the brightness of a ColorHsv
instance, use the Value
property. This property is useful when you need to adjust the brightness of a color without affecting its hue or saturation.
// Example of using the Value property ColorHsv color = new ColorHsv(120, 0.5f, 0.75f, 1.0f); // Access the Value property float brightness = color.Value; // Modify the Value property color = color.WithValue(0.9f); // Convert to RGB color Color rgbColor = color.ToColor();