2024-03-26
Scientific background
Discrete colour scales
Continuous colour scales
viridis colour
other palettes
custom colours
Crayola colors
Figure 1: Pigments in nature
Figure 2: Response of cones in your eyes
Figure 3: LED emission spectrum
Figure 4: CIE model
Photo of LCD screen with cell phone
Wikipedia page for Pixel
Figure 5: Creating colour models
Figure 6: Additive
Figure 7: Subtractive
Not too many
Keep brightness constant
One shade, vary brightness
Two shades if there is a natural middle or 0, white in middle
Avoid red-green diverging scales
p1 <- penguins |> mutate(body_mass_centered =
body_mass_g - mean(body_mass_g, na.rm=TRUE)) |>
ggplot(aes(flipper_length_mm, bill_length_mm,
color = body_mass_centered)) +
geom_point(size=3) + theme_bw() +
# scale_color_distiller(type="div", palette="RdBu", limits = c(-2000,2000))
scale_color_fermenter(type="div",
palette="RdBu",
limits = c(-2000,2000))
Course notes
Healy and Wilke sections on colour
Blog posting on colour scales in data visualization
Collection of palettes: