Color Blindness Matrices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JSON of 3x3 matrices which transform RGB colors into colorspace which | |
// simulate the imparement of various color blindness deficiency. | |
// | |
// Used by Coblis: http://www.color-blindness.com/Coblis-color-blindness-simulator/ | |
// | |
// The original website posting the matrices has been taken down: | |
// http://www.colorjack.com/labs/colormatrix/ | |
// | |
// RGB transform matrices generated by Michael of www.colorjack.com | |
// Which were created using code by Matthew Wickline and the | |
// Human-Computer Interaction Resource Network ( http://hcirn.com/ ) | |
// | |
// The original matrices were 5x5, for full homogeneous coordinates of RGBA | |
// They have been similified here to 3x3 matrices, because the additional | |
// dimensions were simple identity. | |
// | |
// These are very inaccurate so consider other methods. See comments on this gist. | |
var colorMats = {'Normal':[1,0,0, | |
0,1,0, | |
0,0,1], | |
// Red-Blind | |
'Protanopia': [0.567,0.433,0.000, | |
0.558,0.442,0.000, | |
0.000,0.242,0.758], | |
// Red-Weak | |
'Protanomaly': [0.817,0.183,0.000, | |
0.333,0.667,0.000, | |
0.000,0.125,0.875], | |
// Green-Blind | |
'Deuteranopia': [0.625,0.375,0.000, | |
0.700,0.300,0.000, | |
0.000,0.300,0.700], | |
// Green-Weak | |
'Deuteranomaly':[0.800,0.200,0.000, | |
0.258,0.742,0.000, | |
0.000,0.142,0.858], | |
// Blue-Blind | |
'Tritanopia': [0.950,0.050,0.000, | |
0.000,0.433,0.567, | |
0.000,0.475,0.525], | |
// Blue-Weak | |
'Tritanomaly': [0.967,0.033,0.00, | |
0.00,0.733,0.267, | |
0.00,0.183,0.817], | |
// Monochromacy | |
'Achromatopsia':[0.299,0.587,0.114, | |
0.299,0.587,0.114, | |
0.299,0.587,0.114], | |
// Blue Cone Monochromacy | |
'Achromatomaly':[0.618,0.320,0.062, | |
0.163,0.775,0.062, | |
0.163,0.320,0.516]}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for providing these matrices. It makes me possible to create a html-js for selecting a color blind friendly color set. A power point file should be color blind friendly, yes absolutely. But, we have other problems.
I write a html-js for my studens.