![]() |
![]() |
![]() |
ColorOperator.AdjustContrast Method |
Language: |
Adjusts the contrast value of a color.
Visual Basic .NET Public Shared Function AdjustContrast( _
ByVal c As Color, _
ByVal s As Single _
) As ColorC# public static Color AdjustContrast(
Color c,
float s
);Managed C++ public: static Color AdjustContrast(
Color c,
float s
);JScript .NET public static function AdjustContrast(
c : Color,
s : float
) : Color;
c System.Drawing.Color. A Color object that specifies the color to adjust.
s System.Single. Floating-point value that represents the contrast value to apply to the given color. See Remarks.
System.Drawing.Color . Returns a Color
object that represents the result of the contrast adjustment.
The s parameter linearly interpolates between 50 percent gray and the color. There are no limits on the parameter's value. If the value is 0, the returned color is 50 percent gray. If the value is 1, the returned color is the original color. If s is greater than 0 and less than 1, the contrast is decreased; if it is greater than 1, the contrast is increased.
The input alpha channel is copied, unmodified, to the output alpha channel.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center