Learn R Programming

khroma (version 1.14.0)

tol: Paul Tol's Color Schemes

Description

Paul Tol's Color Schemes

Arguments

Qualitative Color Schemes

The qualitative color schemes are used as given (no interpolation): colors are picked up to the maximum number of supported values.

PaletteMax.
bright7
highcontrast3
vibrant7
muted9
mediumcontrast6
pale6
dark6
light9

According to Paul Tol's technical note, the bright, highcontrast, vibrant and muted color schemes are color-blind safe. The mediumcontrast color scheme is designed for situations needing color pairs.

The light color scheme is reasonably distinct for both normal or colorblind vision and is intended to fill labeled cells.

The pale and dark schemes are not very distinct in either normal or colorblind vision and should be used as a text background or to highlight a cell in a table.

Refer to the original document for details about the recommended uses (see references)

Diverging Color Schemes

If more colors than defined are needed from a given scheme, the color coordinates are linearly interpolated to provide a continuous version of the scheme.

PaletteMax.NA value
sunset11#FFFFFF
nightfall17#FFFFFF
BuRd9#FFEE99
PRGn9#FFEE99

Sequential Color Schemes

If more colors than defined are needed from a given scheme, the color coordinates are linearly interpolated to provide a continuous version of the scheme.

PaletteMax.NA value
YlOrBr9#888888
iridescent23#999999
discreterainbow23#777777
smoothrainbow34#666666

Rainbow Color Scheme

As a general rule, ordered data should not be represented using a rainbow scheme. There are three main arguments against such use (Tol 2018):

  • The spectral order of visible light carries no inherent magnitude message.

  • Some bands of almost constant hue with sharp transitions between them, can be perceived as jumps in the data.

  • Color-blind people have difficulty distinguishing some colors of the rainbow.

If such use cannot be avoided, Paul Tol's technical note provides two color schemes that are reasonably clear in color-blind vision. To remain color-blind safe, these two schemes must comply with the following conditions:

discreterainbow

This scheme must not be interpolated.

smoothrainbow

This scheme does not have to be used over the full range.

Details

The maximum number of supported colors is only relevant for the qualitative color schemes (divergent and sequential schemes are linearly interpolated).

Qualitative data

bright (7), high contrast (3), vibrant (7), muted (9), medium contrast (6), pale (6), dark (6), light (9).

Diverging data

sunset (11), nightfall (17), BuRd (9), PRGn (9).

Sequential data

YlOrBr (9), iridescent (23), incandescent (11), discrete rainbow (23), smooth rainbow (34).

References

Tol, P. (2021). Colour Schemes. SRON. Technical Note No. SRON/EPS/TN/09-002, issue 3.2. URL: https://personal.sron.nl/~pault/data/colourschemes.pdf