D.7 Resources
This page provides a (necessarily incomplete) collection of color-related resources.
D.7.1 Books
The landmark publications by Jacques Bertin (e.g., Bertin, 2011) and Edward R. Tufte (Tufte, 2001, 2006; Tufte, Goeler, & Benson, 1990) provide solid advice and many inspiring examples.
More recent publications that are geared to the needs of aspiring data scientists include:
Data Visualization. A practical introduction (by Kieran Healy) is beautiful, informative, and elegant.
Fundamentals of Data Visualization (by Claus O. Wilke) provides many instructive examples and helps distinguishing good from ugly graphs.
R Graphics Cookbook (by Winston Chang) provides hands-on advice on using ggplot2 and many useful recipes for data transformation.
Data visualization principles (by Rafael A. Irizarry)
Data visualization: Basic principles (by Peter Aldhous)
See the Wikipedia articles on color vision and color theory for a primer on the theoretical underpinnings of color perception and color systems.
D.7.2 Color resources in R
Base R colors
The grDevices component of R comes with many options and tools for selecting and modifying colors:
Call
colors()
ordemo("colors")
in the Console to view the in-built colors of R.Search for
colors in R cheatsheet
to find many collections of these colors.
See the CRAN task view: Graphic displays, dynamic graphics, graphic devices & visualization for background information and many pointers to additional resources.
Recent color developments in R
For recent color developments in R (as of 2020), see the following posts on the R developer blog:
A new
palette()
for R (by Achim Zeileis, Paul Murrell, Martin Maechler & Deepayan Sarkar, 2019-11-21)HCL-based color palettes in grDevices (by Achim Zeileis & Paul Murrell, 2019-04-01)
A sound introduction to the ideas behind colorspace package is provided by the article colorspace: A toolbox for manipulating and assessing colors and palettes (Zeileis et al., 2020). The colorspace documentation also provides links to additional resources.
D.7.3 Color packages
This chapter mentions, uses, or recommends the following R packages:
Popular and powerful color packages include: colorspace, RColorBrewer, and viridis/viridisLite.
The ggsci and scico packages provide ordered and perceptually-uniform palettes for scientific visualizations. (See Fabio Crameri, Shephard, & Heron, 2020 for an excellent overview of using and misusing color in science communication.)
For more personal color choices, check out the colourlovers, rijkspalette, wesanderson, and yarrr packages.
When dealing with maps and geographic data, consider using the color palettes from the RColorBrewer, viridis, or cartography packages.
The dichromat package allows simulating the effects of different types of color-blindness.
The paletteer package is a meta-color package that provides a uniform interface for palettes from many other packages.
The unikn package provides the color palettes for the University of Konstanz, but also useful functions for easily defining, modifying, and viewing color palettes.
D.7.4 Miscellaneous online links
There is an abundance of sites providing support for individual colors and color palettes. Examples include:
- HTML color picker provides HTML/HEX color codes.
- MyColor.space generates color palettes based on a single color.
- ColorBrewer 2.0 (Brewer, 2019) provides color support for cartography.
- Pantone color finder allows finding the color codes of many “official” colors.
Many online sites collect color palettes and provide their definitions so that they can easily be implemented in various systems. Examples include:
- ColourLovers.com
- ColorHunt.co
- Schemecolor.com (though many names seem dubious)
- Scientific colour maps
Beware
As the wealth of color options are often overwhelming, here are two final notes of caution:
When looking up colors, always double-check their definitions and names — and acknowledge your sources.
Using the color palettes designed by experts typically yields superior results over home-brew solutions.
[65_colors.Rmd updated on 2022-07-15 18:32:01 by hn.]