Tool
Colormap Lab
Pick a colormap or paste your own. See how it looks to readers with colour-vision deficiencies and in greyscale, whether its lightness runs evenly, and copy it as code for matplotlib, gnuplot or PLplot.
Runs in your browser. Nothing you paste leaves this page, and this page loads no analytics.
1. Choose a map
Sequential
Diverging
Cyclic
Rainbow
2. viridis
Lightness along the map
For low-to-high data the line should climb (or fall) steadily; for diverging data it should peak in the middle. Dips and bumps become edges in your figure that are not in your data.
Verdict
3. Export
How the checks work
Lightness. Each colour is converted from sRGB to CIE L*a*b* (D65). L* is the lightness a reader perceives and what survives greyscale printing. For data that runs from low to high, L* should change in one direction only; for diverging data it should peak (or dip) at the centre and fall evenly to both ends. Rainbow maps such as jet break this rule and add bands that are not in the data, as shown in Borland and Taylor (2007) and Crameri, Shephard and Heron (2020).
Even steps. The colour difference between neighbouring steps is measured as CIE76 ΔE in L*a*b*. When some steps are much larger than others, the map shows edges at those points. CIE76 is a simple approximation; it is enough to find uneven maps, not to grade small differences.
Colour-vision deficiencies. Protanopia, deuteranopia and tritanopia are simulated with the model of Machado, Oliveira and Fernandes (2009) at full severity. The check looks for pairs of colours that are clearly different for typical vision but almost the same after simulation. cividis was designed for this case (Nuñez, Anderton and Renslow, 2018).
Which kind of map. Sequential maps suit values from low to high, diverging maps suit values around a meaningful centre (zero, an average), and cyclic maps suit angles and phases. Thyng et al. (2016) give a short guide with examples from oceanography.
Where the maps come from. Colour stops are sampled (64 per map) from matplotlib 3.9.0 and cmocean 3.0.3. Each map shows its source and licence above the export box. The PLplot export uses plscmap1l with RGB control points, as documented in the PLplot manual.