Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adjusts the saturation value of a color.
Definition
Visual Basic Public Shared Function AdjustSaturation( _
ByVal c As Color, _
ByVal s As Single _
) As ColorC# public static Color AdjustSaturation(
Colorc,
float s
);C++ public:
static ColorAdjustSaturation(
Colorc,
float s
);JScript public static function AdjustSaturation(
c : Color,
s : float
) : Color;
Parameters
c System.Drawing.Color
A Colorobject that specifies the color to adjust.
s System.Single
Floating-point value that represents the saturation value to apply to the given color. See Remarks.
Return Value
System.Drawing.Color
Returns a Colorobject that represents the result of the saturation adjustment.
Remarks
The s parameter linearly interpolates between the color converted to grayscale and the original color. There are no limits on the parameter's value. If the value is 0, the returned color is the grayscale color. If the value is 1, the returned color is the original color. If s is greater than 0 and less than 1, the saturation is decreased; if it is greater than 1, the saturation is increased.
The input alpha channel is copied, unmodified, to the output alpha channel.
.gif)