devices/System.Drawing/System.Drawing.cs
/// <summary>
/// Gets the hue-saturation-lightness (HSL) saturation value for this System.Drawing.Color structure.
/// </summary>
/// <returns>The saturation of this System.Drawing.Color. The saturation ranges from 0.0 through
/// 1.0, where 0.0 is grayscale and 1.0 is the most saturated.</returns>
Gets the hue-saturation-lightness (HSL) saturation value for this System.Drawing.Color structure.
Gets the hue - saturation - lightness ( HSL ) saturation value for this System . Drawing . Color structure .
public float GetSaturation()
        {
            float r = ((float)R / 255.0f);
            float g = ((float)G / 255.0f);
            float b = ((float)B / 255.0f);
            float max = r > b ? r : b;
            max = max > g ? max : g;
            float min = r > b ? b : r;
            min = min > g ? g : min;
            return (max == 0) ? 0.0f : (1.0f - (min / max));
        }
public float GetSaturation ( ) { float r = ( ( float ) R / 255.0f ) ; float g = ( ( float ) G / 255.0f ) ; float b = ( ( float ) B / 255.0f ) ; float max = r > b ? r : b ; max = max > g ? max : g ; float min = r > b ? b : r ; min = min > g ? g : min ; return ( max == 0 ) ? 0.0f : ( 1.0f - ( min / max ) ) ; }
Gets the hue-saturation-lightness (HSL) saturation value for this System.Drawing.Color structure.
Gets the hue - saturation - lightness ( HSL ) saturation value for this System . Drawing . Color structure .
The saturation of this System.Drawing.Color. The saturation ranges from 0.0 through
1.0, where 0.0 is grayscale and 1.0 is the most saturated.
The saturation of this System . Drawing . Color . The saturation ranges from 0 . 0 through 1 . 0 where 0 . 0 is grayscale and 1 . 0 is the most saturated .