CBB12: Convenience function to access the cbb12 color palette

Description Usage Arguments Details Value Examples

Description

CBB12 provides an interface to the cbb12 tibble that includes compact notation for different orderings of the colors, based on what type of data you are plotting.

Usage

1
CBB12(i = NULL, order = "d2l", trit = TRUE)

Arguments

i

Indicies for colors to pull from cbb12. If NULL, a vector of all unique colors is returned.

order

A string in c('d2l', 'c') indicating the preferred order (see details).

trit

A logical value. TRUE indicates tritanopia-friendly colors such that the colors returned should include only colors that are distinguishable for individuals with tritanopia (see details).

Details

Ordering: d2l results in an ordering of the colors from dark to light (default), l2d results in an ordering of the colors from light to dark, and c results in an ordering of the colors that maximizes contrast.

Tritanopia: An effort has been made to order colors in such a way that they do not appear next to colors that might otherwise be indistinguishable for individuals with tritanopia. In general you should leave these out (the default), unless you need more than 9 colors, in which case you should be careful to avoid having two similar colors appear next to eachother.

Value

A vector of colors

Examples

1
plot(1:9, 1:9, pch = 18, col = CBB12(1:9))

johnsonra/tutorialTK documentation built on May 26, 2019, 6:53 p.m.