trubetskoy_colors: use this color pallete

View source: R/trubetskoy_colors.R

trubetskoy_colorsR Documentation

use this color pallete

Description

use this color pallete

Usage

trubetskoy_colors(n, alpha = 1, nogray = FALSE)

Arguments

n

the number of colors you want (1:22 if you want black and white and gray; 1:19 if not)

alpha

set the alpha of all the colors together at once I don't let you do it indepdently

nogray

defaults to FALSE, if set to TRUE then it doesn't return black and white amd gray.

Details

this uses the color pallete described here: https://sashat.me/2017/01/11/list-of-20-simple-distinct-colors/ and inspired by Kenneth Kelly's 22 colors of maximum contrast. Kelly's are better matched for "brightness" but these are more distinct to my eyes.

Value

a vector of hexcoded rgb colors

Examples

## Not run: 
plot(1:22, rep(1, 22), pch = 16, cex = 5, col = trubetskoy_colors(22))  

## End(Not run)

williamcioffi/chf documentation built on June 9, 2022, 5:38 p.m.