ColorMatrixFilter Class

A color matrix, as a filter: the filter functions of CSS that change colors, feColorMatrix of SVG.

public sealed class ColorMatrixFilter : Filter

Remarks

The matrix is applied to the colors of each pixel without their alpha (straight), as fractions of one, and the result is clipped to the range from 0 to 1: R' = m00 R + m01 G + m02 B + m03 A + m04, and so on. A transparent pixel has the color black: a matrix with a constant in its row of alpha makes it visible.

Inheritance
Filter ColorMatrixFilter

Constructors

NameDescription
ColorMatrixFilter(ColorMatrix)Initializes a new instance of the ColorMatrixFilter class.

ColorMatrixFilter(ColorMatrix)

ColorMatrixFilter.cs

Initializes a new instance of the ColorMatrixFilter class.

public ColorMatrixFilter(ColorMatrix matrix)

Parameters

matrix ColorMatrix
The matrix.

Exceptions

ArgumentNullException
matrix is null.

Properties

NameDescription
MatrixGets the matrix.

Gets the matrix.

public ColorMatrix Matrix { get; }

Property value

ColorMatrix