File Exchange

image thumbnail

Colormaps compatible with red-green color perception deficiencies

version 1.5 (14.5 KB) by

Colormaps for displaying data compatible with red-green color perception deficiencies



View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Visualization of data concerns most scientists. The use of color is required in order to display multidimensional information. In addition, color encoding a univariate image can improve the interpretation significantly. However up to 10% of the adult male population are affected by a red-green color perception deficiency which hampers the correct interpretation and appreciation of color encoded information. This work attempts to give guidelines on how to display a given dataset in a balanced manner. Three novel color maps are proposed providing readers with normal color perception a maximum of color contrast while being a good compromise for readers with color perception deficiencies.
These colormaps are designed to be printer-friendly both for color printers as as well as B&W printers.
The colormap is "save" for being viewed by persons with a color perception deficiency.
For further information, please see:
M. Geissbuehler and T. Lasser "How to display data by color schemes compatible with red-green color perception deficiencies" Opt. Express 21, 9862-9874 (2013)

Comments and Ratings (9)



M S (view profile)

FYI, I've searched for "colorblind" on matlab FEX many many times, never saw this! I'd add that as a keyword.

Jan Kappen

Not that it matters a lot, but I've noticed that unzipping the archive on Linux results in __MACOSX archive being created in addition to colormaps_mathworks_v11. I am not sure if this is a result of how the file was compressed, but perhaps it could be cleaned up if it is.

Otherwise, thank you for this submission, firemap is my favorite color scheme. Perhaps it would be useful to note that "morgenstemning" is the old "firemap" submission, for us who are making the switch (I preferred "firemap" for the name - it was easier to spell and remember).

John D'Errico

John D'Errico (view profile)

I've had some time to play with this now. Neat. I spent some time many years ago working with simulations of color blindness, so I am quite happy to see the authors provide this utility.

Thank you John, for this constructive comment. The code has been modified as you suggested! I admit I was not aware of these conventions with the H1 line. Thanks for pointing it out!

John D'Errico

John D'Errico (view profile)

Some interesting ideas that I like here, plus a few things that I don't like at all.

The code has enough help in the beginning, but it lacks one very important tool - an H1 line. The H1 line is the very first line of comment. (Look at ANY matlab function provided by The MathWorks. What is the first comment line? For example besselj.)

The H1 line contains a descriptive line of text that explains what the function does. It includes key words that a user will search for. When you provide an H1 line, it enables lookfor to work. In the example, suppose I wanted to use a bessel function, but I did not remember that besselj is the tool I needed? I would type in matlab

lookfor bessel

Matlab will not respond with a list of names of half a dozen functions that do something with bessel functions, as well as those descriptive H1 lines that were so thoughtfully provided.

In your case, the very first line of comment that you provided was less helpful:


The only search that will ever find your code using lookfor will be a rather uninteresting search. Face it, not everybody will remember the name "fireprint" next month or next year, or even next week, when they want to use the code they downloaded. This is what lookfor enables.

The next thing I don't like is the use of a non-standard MATLAB interface. Arguments must be provided as a structure. The MATLAB paradigm is to use property/value pairs for a problem like this. In this code, you must provide a structure with field names of .minColor, .maxColor, and .invert.

Requiring correctly spelled field names, including correct capitalization is not terribly friendly.

You might also be interested in my other colormap-contribution: "isolum" a colormap that keeps the luminescence constant while incorporating as many colors as possible:



- Merged previous entries "fireprint" and "isolum" into this one archive.
- Optimization of gray-scale conversion for morgenstemning
- Optimization of contrast for isolum
- Naming convention as used in my recently published article


Added default matlab-argument parsing style as suggested by a user. Additionally modified the comment section to be compliant with the default matlab-standard as suggested by the same user.

MATLAB Release
MATLAB 7.9 (R2009b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video