Create a color matrix that adjusts the color saturation of an image.
Syntax

[C#]

static XColorMatrix MakeSaturation(double saturation);
static XColorMatrix MakeSaturation(double redWeight, double greenWeight, double blueWeight, double saturation);

[Visual Basic]

Shared Function MakeSaturation(saturation As Double) As XColorMatrix
Shared Function MakeSaturation(redWeight As Double, greenWeight As Double, blueWeight As Double, saturation As Double) As XColorMatrix
Params
Name Description
redWeight The amount of brightness that red contributes.
greenWeight The amount of brightness that green contributes.
blueWeight The amount of brightness that blue contributes.
saturation The amount of saturation to apply.
Notes

Use this method when you want to create a color matrix that adjusts the color saturation of an image. Color saturation can be seen as a kind of color contrast. Saturation values greater than one increase the color contrast of an image. Values smaller than one decrease it.

By default, this matrix uses linear RGB weights rather than NTSC weights, but this can be overridden by specifying explicit values.

See Also

TransformColors

Example

None.