Color scales

Visualizing Geospatial Data in R

Charlotte Wickham

Assistant Professor at Oregon State University

A perceptual color space: HCL

  • Trichromatic - we perceive color as three-dimensional

hcl1.png

1 Image credit: Hadley Wickham
Visualizing Geospatial Data in R

A perceptual color space: HCL

  • Trichromatic - we perceive color as three-dimensional

hcl2.png

1 Image credit: Hadley Wickham
Visualizing Geospatial Data in R

A perceptual color space: HCL

  • Trichromatic - we perceive color as three-dimensional

hcl3.png

1 Image credit: Hadley Wickham
Visualizing Geospatial Data in R

A perceptual color space: HCL

  • Trichromatic - we perceive color as three-dimensional

hcl4.png

1 Image credit: Hadley Wickham
Visualizing Geospatial Data in R

A perceptual color space: HCL

  • Trichromatic - we perceive color as three-dimensional

hcl5.png

1 Image credit: Hadley Wickham
Visualizing Geospatial Data in R

Types of scale

  • Sequential - ordered
    • Steps in chroma and/or luminance
    • Hue may be redundant coding

  • Diverging - ordered but in two directions
    • Steps in chroma and/or luminance
    • Hue distinguishing direction

  • Qualitative - unordered
    • Steps in hue
    • Equal chroma and luminance

scale1.png

scale2.png

  scale3.png

scale4.png

  scale5.png

scale6.png

Visualizing Geospatial Data in R

Generating color scales in R

library(RColorBrewer)
display.brewer.all()
brewer.pal(n = 9, "Blues")
"#F7FBFF" "#DEEBF7" "#C6DBEF" "#9ECAE1" "#6BAED6" "#4292C6" "#2171B5" "#08519C" "#08306B"
library(viridisLite)
viridis(n = 9)
"#440154FF" "#472D7BFF" "#3B528BFF" "#2C728EFF" "#21908CFF" "#27AD81FF" "#5DC863FF" 
"#AADC32FF" "#FDE725FF"
Visualizing Geospatial Data in R

Let's practice!

Visualizing Geospatial Data in R

Preparing Video For Download...