The Saturation
property of the ColorHsv
struct represents the saturation level of the color. It is a float
value ranging from 0 to 1, where 0 indicates a completely desaturated color (white) and 1 indicates full saturation (vivid color).
The Saturation
property of the ColorHsv
struct represents the saturation level of the color. It is a float
value ranging from 0 to 1, where 0 indicates a completely desaturated color (white) and 1 indicates full saturation (vivid color).
Use the Saturation
property to get or set the saturation level of a ColorHsv
instance. Adjusting the saturation can change the intensity of the color, making it more or less vivid.
// Example of using the Saturation property ColorHsv color = new ColorHsv(); color.Saturation = 0.5f; // Set the saturation to 50% float currentSaturation = color.Saturation; // Get the current saturation // Adjust the saturation color = color.WithSaturation(0.8f); // Increase saturation to 80%