Color Blindness in ColorSeq

📆

👤

ColorSeq version 1.1 is released to support color blindness during the generation of the color sequences and various improvements in several areas of generation. This version of ColorSeq offers color blindness simulation using the 1997 formula made by Hans Brettel, Françoise Viénot, and John D. Mollon.

So, seeing as more and more programs are getting accessibility options, including Windows 10 which got color filters for color blindness simulation, we are seeking to add the first ever accessibility option for our ColorSeq library. Using this version of the library, we’re going to demonstrate how the color blindness worked in our test application.

The Formula

To simulate color blindness using the Brettel 1997 formula, the first thing to be done is to convert the sRGB data from the input to the new color space, LMS. We also need to remove the gamma correction to work with the three color values to achieve our goal using this formula:

After the conversion of three values (R, G, B) to Linear RGB is complete, we can now manipulate with the data. First off, we’re going to get a separation plane for RGB, which consists of the following values:

Protan type

Deutan type

Tritan type

After that, we’re going to choose which plane to use – the first transformation plane or the second full transformation plane – by multiplying the RGB data for each channel with the separation plane of the same type, clarified by this formula:

…using the below planes selected by the below formula:

Protan type

First plane

Second plane

Deutan type

First plane

Second plane

Tritan type

First plane

Second plane

Then, we’ll start the transformation for the three color channels as below:

where channel idx (index) 0 is R, idx 1 is G, and idx 2 is B

After that, we’ll apply the severity factor from the linear interpolation to finally apply the color blind effect to the color according to the severity and color blindness type.

When we’re done, converting the results to sRGB will result in a useful RGB color sequence which we can use to print the adapted colored output to the console.

Our test

In our test application, the color blindness filter will trigger, running across all types with severities of both 0.6 (-anomaly) and 1.0 (-anopia) in all the 255 colors in their own lines, as shown in the below screenshot.

Excited? Get it!

If you are colorblind or if you want to simulate how colorblind people look at your console application, get the latest version of ColorSeq, 1.1, which is free to download.

Bibliography

Hans Brettel, Françoise Viénot, and John D. Mollon, “Computerized simulation of color appearance for dichromats,” J. Opt. Soc. Am. A 14, 2647-2655 (1997)

Get it at Optica Publishing Group

Discover more from Aptivi

Subscribe to get the latest posts to your email.

Thoughts?

Subscribe to our newsletter?

Subscribe today to get new articles instantly delivered to you!

Not now

Design a site like this with WordPress.com
Get started