Palette library for paper figures

Color palettes for scientific papers

Ready-made color palettes for every kind of paper figure: colorblind safe sets for data plots, palettes in the style of Nature, Science and Lancet figures, and the light palettes that AI conference papers really use. Each one has its HEX codes, code for R, Python, MATLAB and CSS, and a button that opens the AI figure maker in those colors.

Palettes
27
Colorblind safe sets
10
Journal styles
8
Figures measured
1,801
Data plot
Heatmap
Figure 1 diagram
Journal style

Pick a palette by what you are drawing

Filter by the kind of figure. Click a color to copy it, copy the whole palette, or open the AI figure maker with these colors applied.

viridis

Colorblind safe

Continuous values from low to high (heatmaps, density, intensity).

cividis

Colorblind safe

Sequential data where the scale should look nearly the same with red-green deficiency.

How to choose colors for a scientific paper

Six rules that hold whichever palette you pick.

Read the full color guide
  1. 1

    Match the palette to the data

    Groups with no order need distinct hues (a qualitative palette). Values from low to high need one smooth ramp such as viridis. Values around a midpoint, such as fold change or correlation, need a diverging scale with a light center.

  2. 2

    Keep the number of colors small

    Past five to eight colors, categories get hard to tell apart, and Elsevier’s artwork guide suggests three or four per figure. With more groups, label them directly or add markers and line styles.

  3. 3

    Make it work without color

    About 8% of men and 0.4% of women of European descent have red-green color vision deficiency. Avoid red against green, never let color be the only cue, and check the figure in a colorblind simulation.

  4. 4

    One color, one meaning

    Give each group, model or condition a color and keep it in every panel and every figure of the paper. A reader who learns “blue is our method” in Figure 1 should not have to relearn it in Figure 4.

  5. 5

    Light fills, strong marks

    Large boxes in a diagram take light tints so black text stays readable. Thin lines, points and the one element you want noticed take strong colors. That is why diagram palettes and plot palettes differ.

  6. 6

    Follow the journal’s color rules

    Journals ask for legibility rather than particular colors: RGB files, no colored text, no red against green. Nature, for example, asks for an accessible palette and names the Wong palette, the same colors as Okabe-Ito.

Questions about color palettes for papers

What is the best color palette for a scientific paper?

It depends on the figure. For categories in a data plot, Okabe-Ito is the safest default: eight colors that stay apart for color-blind readers. For heatmaps and other continuous values, use viridis or cividis. For method diagrams and a Figure 1, light tints like the AI conference palettes keep text readable. Use one palette across the whole paper.

How many colors should one figure use?

As few as the message needs. Five to eight distinct colors is the practical limit for categories, and many guides advise three or four per figure. If a plot has more groups, highlight the ones that matter in color and show the rest in grey, or split it into panels.

Which of these palettes are colorblind safe?

The sets in the colorblind friendly collection (Okabe-Ito, Paul Tol’s schemes, IBM, viridis and cividis) are designed to be. The journal-style and AI conference palettes are not: some of their pairs look alike to color-blind readers. Their pages show which pairs and a safer subset for each.

How do I use a palette in R or Python?

Open the code panel of any palette. In R, scale_color_manual(values = c(...)) applies a HEX list in ggplot2, and the ggsci package has the journal-style palettes built in. In Python, set the HEX list as matplotlib’s color cycle, or pass it to seaborn with sns.set_palette([...]). MATLAB and CSS versions are there too.

Can I get the colors of a figure I like?

Yes. Upload it to the color palette from image tool: it lists the main colors with their HEX codes and share of the image, and gives the same R, Python and CSS code. The colors of any figure in our paper figure gallery are shown in its large view.

Do journals require specific colors?

No journal we know of requires particular colors. Guidelines ask that figures read clearly: an accessible palette, no red against green, no colored text, and RGB color. Our journal figure requirements pages list the rules of 14 publishers.

Draw your next figure in one of these palettes

Press Draw with these colors under any palette, and the AI figure maker opens with the colors applied. Describe the figure and get a first draft.

Open the AI figure maker