Colorblindness

Design and Engineering Considerations

Trichromatic Theory

3 types of cones in eyes, categorized by what wavelength of light they respond to

 

Dichromatic vision means someone has one type of malfunctioning cone (due to genetics or physical damage)

What it looks like

Cones sorted by (L)ong, (M)edium, (S)hort wavelengths

 

Red-green:

Protanopia - defective L-cone

Deuteranopia - defective M-cone

 

Blue-yellow:

Tritanopia - defective S-cone

'Red-Green'

L- and M-cone sensitivity ranges are really close!

 

S-cones are on their own.

 

This is why people usually just talk about red-green and blue-yellow colorblindness.

Opponent Theory

Previous slides described physical, external stimuli

 

Opponent Theory describes neurological view of those stimuli

 

LMS signals get converted into three axes:

  • Luminance
  • Red-Green
  • Yellow-Blue

Geometric

Easy to visualize color as a set of xyz coordinates in 3D space

 

Different kinds of color spaces exist:

  • RGB (bitmap, doesn't cover full gamut)
  • HSV (hue, saturation, value
  • LMS (describing physical light)
  • CIELAB (A, R<->G, Y<->B)

Design

  • Avoid using colors close enough in hue to each other
    • i.e. deeply saturated red and green are fine; but oranges/yellows/browns are too 'close'
  • Rely on value contrast instead
    • Bright/dark instead of color
  • Use non-colored symbols or patterns

Visible to everyone

R-G 'confusion'

Engineering

For each pixel,

  1. Convert from RGB to LMS
  2. Simulate defective vision
    • Skipping a -lot- of math here
  3. Get difference between normal and 'defective' pixel
  4. Scale/"compress" original color range to defective range
  5. Convert back to RGB

The math

To simulate colorblindness:

  • Input pixel V: 3-color RGB vector
  • Multiply by matrix to the right to convert from RGB to LMS
  • Solve linear combination for a, b, and c
    • aL + bM + cS = 0
  • ​Replace ONE of L, M, or S with defective input instead:
    • ​L' = -(bM + cS) / a
    • M' = -(aL + cS) / b
    • S' = -(aL + bM) / c
  • Multiply by inverse of above matrix to convert back from LMS into RGB

The math

To correct colorblindness:

  • Done with LMS space, all this happens in RGB space
  • Given original pixel and colorblind-simulated pixel V'
  • error delta E = V - V'
  • error transform T = matrix on right
  • Corrected pixel = V + TE

Colorblindness and Design/Engineering Considerations

By tdhoward

Colorblindness and Design/Engineering Considerations

  • 452