-
Notifications
You must be signed in to change notification settings - Fork 6
/
ColorBlindInfo.txt
57 lines (54 loc) · 2.08 KB
/
ColorBlindInfo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
It is not easy to find color transformations for color vision deficiency that go directly
from RBG-in to RGB-out, so I am copying them here. They are from: https://gist.github.com/Lokno/df7c3bfdc9ad32558bb7
// 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.
//
// I'm currently evaluating the code that produced these results for accuracy.
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]};