Channel Mixing

Channel mixing applies a 3x3 matrix to the RGB channels of a color to produce new colors. These functions are performed in the ChannelMixer static class.

float[] m;
Color color = color.ChannelMix(m);
Color[] colors = colors.ChannelMix(m);

🙈 Color Blindness

Color blindness can be simulated through channel mixing, although it is not as accurate as the normal methods. See the Color Blindness manual for more information on the intended way. That said, this is how you can simulate color blindness with channel mixing:

Color protanopia = color.ChannelMix(ColorVision.Protanopia);
Color deuteranopia = color.ChannelMix(ColorVision.Deuteranopia);
Color tritanopia = color.ChannelMix(ColorVision.Tritanopia);