Paul Tol's Discrete Colour Schemes for ggplot2 and ggraphSource:
Provides qualitative colour scales from Paul Tol's Colour Schemes.
A discrete scale.
The qualitative colour schemes are used as given (no interpolation): colors are picked up to the maximum number of supported values.
According to Paul Tol's technical note, the
muted colour schemes are colour-blind safe. The
mediumcontrast colour scheme is designed for situations needing colour
light colour scheme is reasonably distinct for both normal or
colourblind vision and is intended to fill labeled cells.
dark schemes are not very distinct in either normal or
colourblind 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).
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
library(ggplot2) ggplot2::ggplot(mpg, ggplot2::aes(displ, hwy, colour = class)) + ggplot2::geom_point() + scale_colour_bright() ggplot2::ggplot(mpg, ggplot2::aes(displ, hwy, colour = class)) + ggplot2::geom_point() + scale_colour_vibrant() ggplot2::ggplot(diamonds, ggplot2::aes(clarity, fill = cut)) + ggplot2::geom_bar() + scale_fill_muted()