Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

feColorMatrix element | SVGFEColorMatrixElement object

This filter applies a matrix transformation.

Scalable Vector Graphics: Filter Effects, Section 15.25.4Internet Explorer 10


<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
<feColorMatrix type="hueRotate" in="SourceGraphic" values="90"/>
<feColorMatrix type="luminanceToAlpha" in="SourceGraphic" result="a"/>

DOM Information

Inheritance Hierarchy



The SVGFEColorMatrixElement object has these types of members:


The SVGFEColorMatrixElement object has these properties.



Gets or sets the height of an element.


Identifies input for the given filter primitive.


Provides a reference for the output result of a filter.


Indicates the type of matrix operation.


Numeric values for the feColorMatrix transformation matrix.


Defines the width of an element.


Gets or sets the x-coordinate value.


Gets or sets the y-coordinate value.


Standards information


This filter applies the following matrix transformation:

| R' |     | a00 a01 a02 a03 a04 |   | R |
| G' |     | a10 a11 a12 a13 a14 |   | G |
| B' |  =  | a20 a21 a22 a23 a24 | * | B |
| A' |     | a30 a31 a32 a33 a34 |   | A |
| 1  |     |  0   0   0   0   1  |   | 1 |

This matrix is applied on the RGBA color and alpha values of every pixel on the input graphics to produce a result with a new set of RGBA color and alpha values.

The calculations are performed on non-premultiplied color values. If the input graphics consist of premultiplied color values, those values are automatically converted into non-premultiplied color values for this operation.

The type attributed is used to indicate the type of matrix operation. The keyword matrix indicates that a full 5x4 matrix of values will be provided. The other keywords (see values) represent convenience shortcuts to allow commonly used color operations to be performed without specifying a complete matrix. If the attribute type is not specified, the effect is as if a value of matrix were specified.



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.