Share via


ColorOperator.AdjustContrast Method ()

Adjusts the contrast value of a color.

Overload List

public static Color AdjustContrast(Color, float);
public static ColorValue AdjustContrast(ColorValue, float);
public static int AdjustContrast(int, float);

Remarks

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.