This documentation is archived and is not being maintained.

ColorMatrix Class

Defines a 5x5 matrix that contains the coordinates for the RGBA space. Several methods of the ImageAttributes class adjust image colors by using a color matrix. Not inheritable.

For a list of all members of this type, see ColorMatrix Members.


[Visual Basic]
NotInheritable Public Class ColorMatrix
public sealed class ColorMatrix
public __gc __sealed class ColorMatrix
public class ColorMatrix

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


The matrix coefficients constitute a 5x5 linear transformation that is used for transforming ARGB homogeneous values. For example, an ARGB vector represented as alpha, red, green, blue, and w, where w is always 1.


Namespace: System.Drawing.Imaging

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Drawing (in System.Drawing.dll)

See Also

ColorMatrix Members | System.Drawing.Imaging Namespace