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 black (no brightness) and 1 indicates full brightness (the color at its most vivid).
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 black (no brightness) and 1 indicates full brightness (the color at its most vivid).
To adjust the brightness of a ColorHsv
instance, you can directly set the Value
property. This property is useful when you want to modify the brightness of a color without affecting its hue or saturation.
// Create a ColorHsv instance with specific hue, saturation, and value ColorHsv color = new ColorHsv { Hue = 120, Saturation = 0.5f, Value = 0.75f }; // Adjust the brightness of the color color.Value = 0.9f; // Convert to a Color object Color rgbColor = color.ToColor();