Colour in Scientific Figures: Colour-Blind-Safe Palettes and Why Jet Distorts Your Data
A practical guide to colour in materials science figures: why rainbow/jet colour maps create false features, which colour maps to use for heat maps and strain maps, colour-blind-safe line colours, and a free tool to check your figure.
Quick answer: For maps (heat maps, strain maps, intensity maps) use a perceptually uniform colour map such as viridis, cividis or Crameri’s batlow, and a diverging one (e.g. vik) centred on zero for signed data. Avoid jet and other rainbow maps: their lightness rises and falls, so they draw edges that are not in your data. For lines and bars, use a colour-blind-safe palette such as Okabe–Ito and a second cue (marker, line style or direct label). Then check the figure in a colour-blindness simulation and in greyscale. The free cvd_check.py does both.
Why colour is a scientific problem, not a style choice
Colour in a figure encodes numbers. If the encoding is uneven, readers see differences that do not exist and miss the ones that do. This is not a niche concern: in a 2020 Nature Communications article, Crameri, Shephard and Heron argue that colour maps which “visually distort data through uneven colour gradients” or which are unreadable for people with colour-vision deficiency are still widespread in science, and that this affects how results are interpreted [1]. Thirteen years earlier, Borland and Taylor’s IEEE Computer Graphics and Applications column “Rainbow color map (still) considered harmful” found the rainbow map in more than half of the visualization papers they surveyed and as the default in most toolkits [3].
Two separate problems hide behind “bad colours”:
- Perceptual distortion: equal steps in your data do not look like equal steps in colour.
- Accessibility: some readers cannot tell certain colours apart. Red–green colour-vision deficiency is common among men (often quoted as roughly 1 in 12 among those of Northern European ancestry), which is why Nature Methods ran a dedicated column on designing figures for colour-blind readers [2].
Problem 1: the rainbow (jet) map invents features
The figure below shows the same smooth data (one broad hill on a gentle slope) with three colour maps. The bottom row plots each map’s perceived lightness against the data value.

Same data, three colour maps. Lightness was computed in the CAM02-UCS colour space.
Look at what jet does:
- Its lightness climbs steeply, plateaus in the cyan–yellow region, then falls towards dark red. A smooth slope therefore looks like a sharp cyan boundary, and a band that does not exist appears around the hill.
- The highest values (dark red) are darker than the middle values (cyan/yellow), so the eye reads the peak as less intense than its surroundings.
- In greyscale (or for many colour-blind readers), high and low values become indistinguishable, because both ends are dark.
viridis and batlow increase in lightness monotonically, so the hill looks like a hill and the slope looks like a slope. That is what “perceptually uniform” means in practice.
Where materials scientists use jet most, and what to use instead:
| Figure | Data type | Use |
|---|---|---|
| Heat map, intensity map, in-situ XRD/Raman contour, EDS intensity, temperature field | Sequential (low → high) | viridis, cividis, batlow, lajolla |
| Strain map (DIC), residual-stress map, difference map, Δ property | Diverging (negative ↔ positive around a meaningful zero) | vik, roma, RdBu centred on 0 |
| Phase map, segmented microstructure | Categorical | Distinct palette (e.g. Okabe–Ito), plus labels |
| EBSD orientation (IPF) map | Orientation key | Keep the standard IPF key, show the legend triangle |
The counter-argument deserves a fair mention: a 2023 IEEE Computer Graphics and Applications article by Ware, Stone and Szafir (“Rainbow colormaps are not all bad”) argues that rainbow maps have real strengths, for example when readers need to look up values against a colour key [5]. If you do use one, use a modern, lightness-corrected rainbow rather than jet, and never for showing the shape of a continuous field.
In Python
import matplotlib.pyplot as plt
from matplotlib.colors import TwoSlopeNorm
import cmcrameri.cm as cmc # pip install cmcrameri (Crameri's scientific colour maps)
ax.imshow(intensity, cmap="viridis") # sequential, built into matplotlib
ax.imshow(intensity, cmap=cmc.batlow) # sequential, Crameri
ax.imshow(strain, cmap=cmc.vik, norm=TwoSlopeNorm(vcenter=0)) # diverging, zero = neutral colour
The TwoSlopeNorm line matters for strain and difference maps: it puts the neutral colour exactly at zero even if your data range is asymmetric (say −0.44 to +0.24). Without it, zero is drawn in a coloured shade and readers misjudge which regions are in tension or compression.
Problem 2: line and bar colours that disappear
Most materials figures are not maps but stacked spectra, XRD patterns and bar charts, usually drawn in default red, green and brown. Here is what that looks like to a reader with red–green colour blindness:

Simulated with the colorspacious library (deuteranomaly, severity 100).
- Red, green and brown collapse into three almost identical olive lines. The legend becomes useless.
- The Okabe–Ito colours (blue, orange, bluish green) stay distinguishable, but notice that orange and green move closer together. Colour alone is still not enough.
The fix is two-part:
- Use a colour-blind-safe palette. The Okabe–Ito set is a good default for up to eight categories:
OKABE_ITO = ["#0072B2", "#D55E00", "#009E73", "#CC79A7",
"#E69F00", "#56B4E9", "#F0E442", "#000000"]
plt.rcParams["axes.prop_cycle"] = plt.cycler(color=OKABE_ITO)
- Add a second cue: different markers or line styles for each sample, or label each curve directly next to it instead of relying on a legend. Direct labels also work in greyscale and save the reader’s eyes from jumping between legend and data.
Practical rules for typical materials figures:
- Stacked spectra or XRD patterns: label each curve at its end (e.g. “300 °C”), so colour becomes optional.
- Composition or temperature series: use a sequential set of colours (light → dark, sampled from viridis or batlow), so the order is visible even without a legend.
- The same sample keeps the same colour in every figure of the paper (XRD, FTIR, SEM inset, bar chart).
- Do not encode meaning in red vs green (good/bad, tension/compression). Use blue vs orange or a diverging map instead.
- Bright yellow on white (#F0E442) is hard to see for thin lines; keep it for fills.
Check your figure in one command
cvd_check.py takes any PNG, TIFF or JPG and writes a four-panel image: original, simulated protanopia, simulated deuteranopia and greyscale.
pip install numpy pillow matplotlib colorspacious
python cvd_check.py Fig2.png # -> Fig2_cvd_check.png
If two samples look the same in any panel, change the colours or add markers or labels. This takes ten seconds and catches problems that a reviewer, or a colour-blind reader, will otherwise find for you.
A short checklist before submission
- No jet or rainbow map for continuous data. Sequential data use a perceptually uniform map, and signed data use a diverging map centred on zero.
- Every colour map has a colour bar with units.
- Lines and bars use a colour-blind-safe palette and markers, line styles or direct labels.
- The same sample has the same colour throughout the paper.
- The figure passes the colour-blind simulation and greyscale check.
- Rougier, Droettboom and Bourne’s “Ten simple rules for better figures” in PLoS Computational Biology lists using colour effectively among its core rules; their paper is a good one-page read before you start [4].
Related: Journal figure size and DPI, How to plot stacked XRD patterns in Python and Error bars and bar charts.
References
- F. Crameri, G. E. Shephard, P. J. Heron, “The misuse of colour in science communication,” Nature Communications 11, 5444 (2020). doi:10.1038/s41467-020-19160-7
- B. Wong, “Points of view: Color blindness,” Nature Methods 8, 441 (2011). doi:10.1038/nmeth.1618
- D. Borland, R. M. Taylor II, “Rainbow color map (still) considered harmful,” IEEE Computer Graphics and Applications 27(2), 14–17 (2007). doi:10.1109/MCG.2007.323435
- N. P. Rougier, M. Droettboom, P. E. Bourne, “Ten simple rules for better figures,” PLoS Computational Biology 10, e1003833 (2014). doi:10.1371/journal.pcbi.1003833
- C. Ware, M. Stone, D. A. Szafir, “Rainbow colormaps are not all bad,” IEEE Computer Graphics and Applications (2023).
Want this built in? The MatSci Figure Kit uses the Okabe–Ito palette by default, with classic, muted and greyscale (mono) palettes one setting away. It also has journal size presets and ten ready-to-edit scripts (XRD, FTIR, Raman, DSC/TMA, particle size, bar and 3-D bar charts, multi-panel figures).
Related Posts
Error Bars and Bar Charts in Materials Papers: SD, SEM or 95% CI, and What n Really Means
What reviewers expect from error bars: when to use standard deviation, standard error or confidence intervals, how to count n for specimens and measurements, why to show individual data points, and how to write it in captions, with a free plotting tool.
Journal Figure Size and DPI: How to Fix "Resolution Too Low" for Good
Column widths, pixel targets and font sizes for Elsevier, ACS, RSC, Wiley and Springer, why changing the DPI number does nothing, and how to export correctly from Python, Origin, Excel and Word.
How to Make a Graphical Abstract for a Materials Science Paper
A step-by-step workflow for graphical abstracts and TOC graphics: journal sizes (Elsevier, ACS, RSC), choosing a layout, building it in PowerPoint at final size, exporting enough pixels, and the mistakes editors notice.