davidhodge931 / ggblanket

Simplify ggplot2 visualisation
https://davidhodge931.github.io/ggblanket/
Other
150 stars 8 forks source link

docs: relatively colour-blind safe and accessible defaults #856

Closed davidhodge931 closed 4 months ago

davidhodge931 commented 4 months ago

14. Relatively colour-blind safe and accessible defaults

The default colour/fill scale palettes (i.e. col_palette_d and col_palette_c) and NA colours are relatively colour-blind safe.

jumble is most accessible on a light background, as the navy colour works less well on a dark background.

The 7th colour of the jumble palette is the same as the default discrete NA colour. So it won't work for plotting 7 values/levels and NA values.

#default discrete palette
colorspace::swatchplot(jumble, cvd = TRUE)
#default continuous scale palette (and default NA colour)
colorspace::swatchplot(c(viridisLite::mako(9), 
                         colorspace::darken(grey, 0.25)), cvd = TRUE)