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

colorThe color to apply the matrix to.
mThe 3x3 matrix to apply to the color.

Returns

ColorThe 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

colorsThe colors to apply the matrix to.
mThe 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

colorThe color to apply the color vision matrix to.
colorVisionThe type of color vision to simulate.

Returns

ColorThe 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

colorsThe colors to apply the color vision matrix to.
colorVisionThe type of color vision to simulate.

Returns

Color[]The colors with the color vision applied.