README.md

desiderata

Desiderata is a personal package with a bunch o' functions that I (Desi) have collected or written as I needed them.

Installation

install.packages("remotes")

remotes::install_github("DesiQuintans/desiderata")

library(desiderata)

Project participants

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Functions

Included colour palettes

A palette of R's 502 distinct built-in colours

show_colours(palette_builtin())

A palette of 1,022 visually-distinct colours

Many of these are not colorblind safe, and many of them have low contrast or are very similar (but should still be different enough to discriminate when they are side-by-side).

show_colours(palette_distinct())

A palette of Adam Morse's 16 web-safe colours

This is a palette by Adam Morse, sourced from https://clrs.cc/.

show_colours(palette_mrmrs())

A palette of 14 hand-picked distinct colours {#a-palette-of-14-hand-picked-distinct-colours}

The palette created by desiderata::palette_distinct() has a lot of colours that are either so dark or so light that it's difficult to differentiate them next to each other. In addition, many of the colours are affected by adjacency effects, where they cannot be differentiated when they're next to a closely-related colour.

I went through the preview plots manually, randomising the order of the colours each time and deleting any colours that were visually similar until I ended up with a list of colours that were easy to differentiate.

show_colours(palette_picked())

Desi's ggplot2 minimal base theme

ggplot(iris, aes(x = Petal.Length, y = Sepal.Length)) + 
    geom_point() + 
    theme_desi_base()



DesiQuintans/desiderata documentation built on April 9, 2023, 5:43 a.m.