
Rainbow color maps distort data, invent boundaries, and exclude 300M colorblind viewers. Learn why perceptually uniform scales like viridis fix the problem.
A cardiologist is looking at a scan of a coronary artery. The software has colored the blood-flow data the way scientific software has colored data for forty years: a rainbow, running from deep blue at the low end through green and yellow to angry red at the high end. The red patch looks like the problem. It is bright, it is loud, it draws the eye. So that is where attention goes. The trouble is that the rainbow put that boundary there. The data did not.
This is not a hypothetical. When researchers tested how physicians read artery visualizations, the ones using a rainbow color scheme took longer to reach a diagnosis and made significantly more errors than those using a perceptually designed scale. The color map was not a neutral container for the data. It was an active participant in the diagnosis — and a misleading one.
Most heatmaps you see at work were built with the same rainbow. It is the default in older versions of MATLAB ("jet"), it lurks in spreadsheet conditional formatting, and it shows up in everything from climate maps to sales dashboards to the heat-coded org chart someone made for the all-hands. It feels scientific. It feels precise. It is neither.
~300 million — People worldwide with some form of color vision deficiency — roughly 1 in 12 men and 1 in 200 women. For a large share of them, the red-to-green journey at the heart of most heatmaps is partly or wholly invisible.
The rainbow color map has been formally "considered harmful" in the visualization research literature since at least 2007, when Borland and Taylor laid out the case in IEEE Computer Graphics and Applications. Their charge sheet has three counts, and every one of them changes what a reader concludes from the same numbers.
A good color scale has one job: equal steps in the data should look like equal steps in color. The rainbow fails this badly. It races through some regions — the jump from cyan to green covers a wide band of values with almost no visible change — and then lurches at others, where a tiny change in value snaps from green to yellow. The result is that the eye sees sharp "edges" and flat "plateaus" that exist only in the color map, not in the underlying data. You are reading the seams of the rainbow and mistaking them for features of the world.
Humans read structure mostly through brightness, not hue. The rainbow's brightness wanders up and down with no relation to the values: yellow is blazing, the blues and reds at the two ends are dark, and cyan sits oddly bright in the middle. So the brightest part of your heatmap is often somewhere in the middle of the range, not the top. The visual "peak" and the data peak are in different places. Detail in the dark blue and dark red zones — frequently the parts that matter most — gets swallowed.
Ask someone whether green is "more" or "less" than orange and they will hesitate. Hues do not carry an intuitive ranking the way light-to-dark does. So readers are forced to keep glancing back at the legend, decoding each color like a foreign alphabet, instead of simply seeing high and low. Every glance back at the key is a small tax on comprehension — and a chance to get it wrong.
![Comparison of the rainbow (jet) color map versus the perceptually uniform viridis color map, in full color and in grayscale]
The same gradient, two color maps, each shown in full color and desaturated. The rainbow's brightness peaks in the middle and collapses at both ends, so its grayscale version is ambiguous — exactly what a colorblind viewer or a photocopier is left with. Viridis rises smoothly from dark to light, so its order survives any of those conditions.
It is tempting to file all of this under taste — some designers like the rainbow, some don't, who cares. But the harm shows up in controlled studies, not style guides. In the heart-disease work, rainbow scales produced slower, less accurate diagnoses. In hydrology, a 2021 paper in Hydrology and Earth System Sciences documented how rainbow maps "distort and mislead" research, prompting formal guidance to stop using them. Across fields, the pattern repeats: the rainbow doesn't just decorate the data, it changes the conclusion.
The rainbow color map confuses viewers through its lack of perceptual ordering, obscures data through its uncontrolled luminance variation, and actively misleads through the introduction of gradients the data never contained.
That last clause is the dangerous one. A chart that is merely ugly wastes a reader's goodwill. A chart that invents boundaries spends a reader's trust on a conclusion that isn't there — and in a financial dashboard, a climate map, or a clinical scan, that conclusion has consequences.
Here is the good news, and it is genuinely good: the problem is solved. In 2015, Stéphane van der Walt and Nathaniel Smith designed viridis, a color map engineered to be perceptually uniform, monotonic in brightness, and legible to viewers with the common forms of color blindness. It became the default in Matplotlib, then spread to R, Python, and beyond. Equal steps in the data look like equal steps in color. Brightness climbs steadily from low to high. Desaturate it and the order survives. Hand it to a colorblind reader and it still reads.
You do not need to know the math to benefit from it. You need to stop reaching for the rainbow. A practical rule of thumb for any heatmap or sequential scale:
None of this costs expressiveness. Viridis and its relatives are vivid, modern, and frankly more beautiful than the muddy rainbow they replace. You lose nothing but the lie.
The deeper lesson is that color in a chart is not paint. It is an encoding — a quiet set of instructions the reader's visual system follows without being asked. When the encoding is honest, the reader sees what is in the data. When it isn't, they see what the palette invented, and they have no way to tell the difference. The rainbow has been telling that small lie, billions of times a day, on dashboards and scans and maps, for decades. It does not have to be on yours.
PlotSet ships with perceptually uniform, colorblind-safe color scales built in — so every heatmap, choropleth, and gradient you make reads correctly for all 300 million of those viewers, on screen or in grayscale. Upload your data, pick a template, and the honest palette is the default.
Borland, D. & Taylor, R. M. (2007). "Rainbow Color Map (Still) Considered Harmful." IEEE Computer Graphics and Applications.
Stoelzle, M. & Stein, L. (2021). "Rainbow color map distorts and misleads research in hydrology." Hydrology and Earth System Sciences, 25, 4549–4565.
van der Walt, S. & Smith, N. — Viridis color maps, default in Matplotlib 2.0 (2015).
Color blindness prevalence: ~8% of men, ~0.5% of women (~300 million people; ~1 in 12 men). Colour Blind Awareness; Wikipedia, "Color blindness."
MathWorks, "A dangerous rainbow: Why colormaps matter" (2018), on clinical diagnostic error with jet.