Thursday, April 24th, 2008>p>
The picture above is showing you how someone with the color blindness trait Tritanopia would see the image. Michael Deal first created the Color Matrix Library, which supports a large portion of the most common color functions available, including:
Hue, Saturation, Brightness, Contrast, Exposure, Temperature, Tint, Channels, Blindness, Colorize, Threshold, and Invert
Michael then created a canvas library that uses the Color Matrix to help us visualize what our content may look like to people who have various color blind issues. Here is what he did:
The most obvious way would be to do the calculations in CIE XYZ using confusion lines, however, <canvas> uses RGB. So youâ€™d have to convert from XYZ to RGB, run the confusion lines, then convert back to RGB. Hereâ€™s an example of what that looks like: Color Blindness Library â€” Itâ€™s great for running on a few colors, but too slow for larger images.
Matrixâ€™s are generally about as quick as youâ€™re going to get for generic color filters, so thatâ€™s what Iâ€™ve converted the formulas into â€“ compliant with Actionscriptâ€™s ColorMatrix, and other programming languages that use standard RGBA matrixâ€™s. Also, Iâ€™ve converted them into color transformâ€™s which are useful in Actionscript (ColorTransform), Pixelmator (Image… Channel Mixer), and Photoshop (Image… Adjustments… Channel Mixer).
I used data generated by Matthew Wicklineâ€™s formulas to base my blindness library. My script triangulates the hue by comparing the un-filtered, completely saturated, RGB values with the same value after theyâ€™d been run through Wicklineâ€™s formula.
Posted by Dion Almaer at 1:35 pm