I was playing around with real-time color correction for colorblind players. I tried to focus on the following three types of color vision deficiencies (simplified explanation):
- Protanopia/Protanomaly: complete/partly absence of red retinal receptors; in about 2% of men (rare for women).
- Deuteranopia/Deuteranomaly: complete/partly absence of green retinal receptors; in about 7% of men (rare for women).
- Tritanopia/Tritanomaly: complete/partly absence of blue retinal receptors; in less than 1% of men/women.
For a more detailed explanation, please refer to Wikipedia. The code I used is based on Tyler Howard’s thesis on a real-time color correction for colorblind users. I adapted the algorithm for a OpenGL ES 2.0 shading algorithm. I have also contacted Tyler Howard for test results but haven’t received a reply back. Also it appears that the color correction used the same method for Protanoopia and Deuteranopia which seems odd. In any case the source code for the OpenGL shader is available below.
I integrated the shading code into Demise of Nations (game still under development). Original uncorrected image:
Simulation and Correction for Protanopia:
Simulation and Correction for Deuteranopia:
Simulation and Correction for Tritanopia:
I generally feel the results with the color correcting code are minimal at best. It appears some of the lightness is corrected when applying the color correction filter but otherwise the benefits are marginal at best. A better option is designing for colorblind users beforehand using different shapes in addition to colors. I would love to hear back from colorblind users, so please comment, thanks.
Another great site regarding color correcting code is daltonize.org. I haven’t tried to integrate the sample code provided but it looks very promising.