ChannelMixer.ChannelMix
Extension Method in ChannelMixer
Declaration
public static Color ChannelMix(this Color color, float[] m)Description
Applies a 3x3 matrix to the RGB channels of the color. Values are clamped to the range [0..1].
Parameters
| color | The color to apply the matrix to. |
| m | The 3x3 matrix to apply to the color. |
Returns
| Color | The color with the matrix applied. |
Overload
Declaration
public static Color[] ChannelMix(this Color[] colors, float[] m)Description
Applies a 3x3 matrix to the RGB channels of the provided colors. Values are clamped to the range [0..1].
Parameters
| colors | The colors to apply the matrix to. |
| m | The 3x3 matrix to apply to the colors. |
Returns
| Color[] | The colors with the matrix applied. |
Overload
Declaration
public static Color ChannelMix(this Color color, ColorVision colorVision)Description
Applies the channel mixer of a given color vision to the RGB channels of the color. Values are clamped to the range [0..1].
Parameters
| color | The color to apply the color vision matrix to. |
| colorVision | The type of color vision to simulate. |
Returns
| Color | The color with the color vision applied. |
Overload
Declaration
public static Color[] ChannelMix(this Color[] colors, ColorVision colorVision)Description
Applies the channel mixer of a given color vision to the RGB channels of the provided colors. Values are clamped to the range [0..1].
Parameters
| colors | The colors to apply the color vision matrix to. |
| colorVision | The type of color vision to simulate. |
Returns
| Color[] | The colors with the color vision applied. |