> For the complete documentation index, see [llms.txt](https://docs.wisej.com/system.drawing.managed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md).

# ColorMatrix

Namespace: **System.Drawing.Imaging**

Assembly: **System.Drawing.Managed** (4.0.0.0)

Defines a 5 x 5 matrix that contains the homogeneous coordinates for the RGBA space.

{% tabs %}
{% tab title="C#" %}

```csharp
public class ColorMatrix
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class ColorMatrix
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ColorMatrix()

Initializes a new instance of the [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md) class.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ColorMatrix(newColorMatrix)

Initializes a new instance of the [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md) class with the elements in the specified matrix.

| Name               | Type                                                                  | Description                                                                                                                                     |
| ------------------ | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **newColorMatrix** | [Single\[\]\[\]](https://docs.microsoft.com/dotnet/api/system.single) | The values of the elements for the new [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md). |

## Properties

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Item(row, column)

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the value of the specified element of this [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix00

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 0th row and 0th column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix01

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 0th row and 1st column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix02

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 0th row and 2nd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix03

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 0th row and 3rd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix04

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 0th row and 4th column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix10

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 1st row and 0th column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix11

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 1st row and 1st column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix12

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 1st row and 2nd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix13

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 1st row and 3rd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix14

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 1st row and 4th column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix20

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 2nd row and 0th column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix21

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 2nd row and 1st column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix22

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 2nd row and 2nd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix23

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 2nd row and 3rd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix24

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 2nd row and 4th column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix30

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 3rd row and 0th column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix31

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 3rd row and 1st column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix32

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 3rd row and 2nd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix33

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 3rd row and 3rd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix34

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 3rd row and 4th column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix40

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 4th row and 0th column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix41

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 4th row and 1st column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix42

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 4th row and 2nd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix43

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 4th row and 3rd column.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Matrix44

[Single](https://docs.microsoft.com/dotnet/api/system.single): Gets or sets the element at the 4th row and 4th column.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
