The Saturation
property of the ColorHsv
struct represents the saturation level of the color. It is a floating-point value ranging from 0 to 1, where 0 indicates no color (white) and 1 indicates full color saturation.
The Saturation
property of the ColorHsv
struct represents the saturation level of the color. It is a floating-point value ranging from 0 to 1, where 0 indicates no color (white) and 1 indicates full color saturation.
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 vivid or more muted.
// Example of using the Saturation property ColorHsv color = new ColorHsv(); // Set the saturation to 0.5 (halfway between white and full color) color.Saturation = 0.5f; // Get the current saturation value float currentSaturation = color.Saturation; // Output the saturation value // Note: Avoid using Console.WriteLine in s&box // Instead, use logging or other appropriate methods for output Log.Info($"Current Saturation: {currentSaturation}");