How to Choose Colors for Scientific Figures: A Practical Guide for Researchers
A practical guide to sequential, diverging, and categorical palettes, plus interactive tools for checking hue, lightness, and grayscale readability.
Color can make a scientific figure easier to read, but the wrong color choices can also make data harder to interpret. For researchers, choosing colors is not simply a matter of matching the visual style of a paper or presentation. The palette needs to work with the type of data, remain readable at different sizes, reproduce well in print, and communicate information without depending entirely on differences in hue.
This guide explains how to approach color selection for scientific figures, from quantitative heatmaps to microscopy images, molecular diagrams, charts, and graphical abstracts.
Start With the Type of Data
The first question should not be “Which colors look good?”
Instead, ask:
What relationship am I trying to show?
Different types of scientific data call for different color strategies.
Sequential data
Use a sequential palette when your values move from low to high.
Examples include:
- Temperature
- Concentration
- Fluorescence intensity
- Population density
- Probability
- Signal strength
A sequential palette should give the reader a clear sense of increasing magnitude.
Matplotlib recommends perceptually uniform sequential maps such as Viridis, Plasma, Inferno, Magma, and Cividis for many quantitative applications.
Diverging data
Diverging palettes are useful when your data has a meaningful central point.
For example, imagine a dataset where zero represents no change:
negative ← 0 → positive
Here, two different color families can represent the two directions, while a neutral color represents the center.
This works well for gene expression changes, experimental differences from a control, temperature anomalies, or measurements relative to a reference value.
The important point is that a diverging palette should have a meaningful midpoint. Using one simply because two colors look attractive can make the figure harder to understand.
Categorical data
Categorical data is different.
If you are comparing five materials, six experimental groups, or several cell types, the colors represent categories rather than numerical magnitude.
In this situation, you generally want colors that are clearly distinguishable from one another. There is no need for the colors to form a smooth gradient.
Why Hue Alone Is Not Enough
One of the biggest mistakes in scientific visualization is treating hue as if it were a numerical scale.
Red, green, blue, yellow, and purple are different hues, but that does not mean the human visual system interprets them as an ordered sequence.
Lightness is particularly important when readers need to understand differences in magnitude. Matplotlib's guidance explains that changes in lightness are generally easier for people to interpret than changes in hue alone.
This is one reason carefully designed scientific colormaps work better than arbitrary sequences of bright colors.
A useful test is to ask:
If I remove the color information, can I still understand something about the structure of the figure?
For many figures, adding contours, labels, symbols, annotations, or texture can provide additional information instead of forcing the reader to decode everything through color.
The Problem With Rainbow Scales
Rainbow palettes are familiar because they contain many visually distinct colors. They can also look impressive in screenshots and presentations.
The problem appears when the colors are used to encode numerical values.
A 2020 study published in Nature Communications examined the use of color in scientific communication and showed that rainbow style maps can produce uneven perceptual changes. Some numerical intervals can appear much more prominent than others, which may create visual patterns that are not present in the underlying data.
The same study recommends evaluating scientific colormaps for both perceptual uniformity and perceptual ordering.
This distinction matters.
A color scale can contain a visually smooth sequence while still giving some numerical intervals more visual emphasis than others.
For quantitative scientific figures, that can affect how the reader interprets the result.
A Better Default for Heatmaps
If you are unsure where to start, Viridis is a useful general purpose option.
For example:
import matplotlib.pyplot as plt
import numpy as np
data = np.random.rand(20, 20)
plt.imshow(data, cmap="viridis")
plt.colorbar(label="Measured value")
plt.show()
Viridis is part of Matplotlib's group of perceptually uniform sequential colormaps, along with Plasma, Inferno, Magma, and Cividis.
That does not mean Viridis is automatically the correct choice for every figure.
Your data should determine the palette.
When Cividis Makes Sense
Cividis is another useful option for quantitative data, particularly when accessibility is an important consideration.
The goal should not be to choose colors that are simply “colorblind friendly” as a label. You should check whether the actual figure remains interpretable under different viewing conditions.
This becomes especially important when color carries the main quantitative information.
If two regions become difficult to distinguish, consider increasing their lightness difference or adding another visual cue.
Do Not Use Red and Green as Your Only Signal
Red and green are commonly used to represent opposing states:
increase vs decrease
active vs inactive
positive vs negative
present vs absent
This can work for some audiences, but it becomes problematic when the distinction depends entirely on color.
Instead, combine color with another signal.
For example:
Increase: red plus upward arrow
Decrease: green plus downward arrow
Or:
Control: solid outline
Treatment: dashed outline
Or:
Positive: one color plus a plus symbol
Negative: another color plus a minus symbol
The idea is simple: important information should not disappear when a reader cannot distinguish two colors.
Check Your Figure in Grayscale
A surprisingly useful test is to temporarily remove the color.
Print the figure in grayscale or convert a copy to grayscale on screen.
Then ask:
Can I still identify the important regions?
This is particularly useful for figures that may eventually appear in printed articles, supplementary PDFs, conference proceedings, or photocopied material.
Matplotlib's documentation points out that some colormaps produce very similar gray values across different colors. When converted to grayscale, information encoded by those colors can therefore become difficult or impossible to distinguish.
You do not necessarily need every figure to work perfectly without color. But important distinctions should have some additional visual support whenever possible.
Think About the Background
The same color can behave very differently depending on its surroundings.
A light yellow may be easy to see against a dark background but almost disappear on a white page.
A dark blue may work beautifully on white but become difficult to distinguish on a black slide.
For research papers, white or very light backgrounds are common. That means extremely light colors should be used carefully.
For presentations and posters, you have more flexibility, but readability should still come before decoration.
Avoid Using Too Many Colors
More colors do not automatically mean more information.
If a figure contains twelve colors, the reader has to remember twelve visual categories. This increases the cognitive load of interpreting the figure.
For many scientific charts, a restrained palette works better.
One useful approach is:
One primary color for the main dataset
One secondary color for comparison
One accent color for emphasis
Neutral gray for supporting information
This gives you enough flexibility to establish hierarchy without turning the figure into a collection of unrelated colors.
Use Color to Create Hierarchy
Color can also help control where the reader looks first.
Suppose your graph contains a large amount of supporting information but one experimental result is the main conclusion.
Instead of making everything equally saturated, keep most elements neutral and reserve stronger color for the result you want readers to notice.
For example:
Supporting data light gray
Axes and labels dark gray
Control muted blue
Main result stronger accent
Key observation accent plus annotation
This approach is often more effective than making every element highly saturated.
Consider the Journal's Final Format
A figure may look excellent on your monitor and still change during publication.
Before submission, consider:
- PDF viewing
- Printed copies
- Reduced figure size
- Black and white reproduction
- Conference projection
- Screens with different brightness
- Accessibility for readers with color vision deficiency
The final figure may be much smaller than the version you designed.
A subtle color difference that looks obvious on a large monitor can become almost invisible when the figure is reduced to journal column width.
Colorbars Need Attention Too
Researchers often spend time choosing a palette and then treat the colorbar as an afterthought.
Do not.
The colorbar is part of the data representation.
Make sure:
- The numerical range is clearly labelled
- Units are included
- Tick marks are readable
- The direction of the scale is intuitive
- Important thresholds are identifiable
- The color progression matches the numerical progression
A reader should be able to look at the colorbar and understand what the colors represent without guessing.
Matplotlib provides colorbar functionality directly alongside its image and colormap tools.
A Useful Workflow for Researchers
Before finalizing a figure, use this simple workflow.
Step 1: Identify the data type
Decide whether your data is sequential, diverging, categorical, or cyclic.
Step 2: Choose the visual variable
Decide whether color should communicate magnitude, category, direction, or simply visual grouping.
Step 3: Select a suitable palette
For continuous data, start with a perceptually uniform palette rather than an arbitrary rainbow gradient.
Step 4: Check accessibility
Look at the figure under different color vision conditions and make sure important information is not dependent on a single hue distinction.
Step 5: Check grayscale
Convert a copy of the figure to grayscale and look for regions that become indistinguishable.
Step 6: Reduce the number of colors
Remove colors that do not communicate useful information.
Step 7: Test the final size
View the figure at approximately the size it will appear in the paper.
Step 8: Ask someone else to interpret it
Give the figure to a colleague without explaining the intended result.
Ask them what they think the figure shows.
If their interpretation differs from yours, the visualization may need revision.
A Short Palette Guide
| Data type | Good starting point |
|---|---|
| Low to high measurement | Viridis |
| Continuous accessible scale | Cividis |
| High contrast continuous data | Inferno |
| Dark to light intensity | Magma |
| Positive and negative values | Diverging palette |
| Experimental categories | Qualitative palette |
| Periodic measurements | Cyclic palette |
Matplotlib provides separate groups for sequential, diverging, cyclic, qualitative, and other colormaps, which makes it easier to match the palette type to the data.
The Goal Is Accurate Communication
There is no universally perfect scientific color palette.
A palette that works for a fluorescence image may not be appropriate for a reaction kinetics graph. A categorical palette for experimental groups is not the same thing as a sequential scale for concentration.
The best choice depends on what the figure needs to communicate.
The key is to make color support the data rather than compete with it.
If a reader can quickly identify the important patterns, understand the numerical ordering, distinguish the experimental groups, and interpret the figure without relying on perfect color perception, you are probably on the right track.
For most researchers, the easiest improvement is also one of the simplest:
Choose the palette based on the data first, then worry about aesthetics.
Sources
Crameri, F., Shephard, G. E., & Heron, P. J. “The misuse of colour in science communication.” Nature Communications, 2020.
Matplotlib Documentation. “Choosing Colormaps in Matplotlib.”
Matplotlib Documentation. “Colormap Reference.”
Frequently asked questions
- What is the best color palette for scientific figures?
- There is no single best palette. For many continuous datasets, Viridis is a useful starting point. Cividis, Plasma, Inferno, and Magma are other perceptually uniform options available in Matplotlib.
- Should I stop using rainbow colors completely?
- Not necessarily. The main concern is using rainbow style gradients to encode quantitative data. Such palettes can produce uneven perceptual emphasis and make numerical differences harder to interpret accurately.
- What should I use instead of Jet?
- For many continuous datasets, try Viridis, Cividis, Plasma, Inferno, or Magma. The correct choice still depends on the structure and purpose of your data.
- How many colors should a scientific figure have?
- There is no fixed number. Use as few colors as possible while preserving the distinctions the reader needs. If several categories must be compared, make sure the colors remain distinguishable and do not rely on color alone.
- How do I make a figure accessible?
- Avoid making important information dependent only on color. Use differences in lightness, symbols, line styles, annotations, or patterns where appropriate. Also test the final figure under different color vision conditions and in grayscale.
More guides on the Sciicons blog · Browse scientific illustrations · Free figure tools