get_lut: Retrieve one or more of color specifications as hex, rgb...

Description Usage Arguments Value Examples

Description

Retrieve one or more of color specifications as hex, rgb triplets or a data.frame

Usage

1
get_lut(LUT, index, form = c("hex", "rgb", "data.frame")[1], name = FALSE)

Arguments

LUT

a color look-up table data frame. See link{GLASBEYLUT}, link{WADLUT}, link{KELLYLUT} and link{BOYNTONLUT}.

index

a vector of numeric or character indices to retrieve colors, if missing then all are returned. If the look-up table has row names, then one can use those for indexing.

form

character, either 'hex', 'rgb' or 'data.frame'

name

logical, ignored if form is 'data.frame'

Value

color values in the form specified

hex

a character vector of hexidecimal strings, this is the default

rgb

a 3-column matrix of red, green and blue values

data.frame

a 4 column data frame, see GLASBEYLUT

Examples

1
2
lut <- get_lut(WADLUT, 3:16, form = 'hex', name = TRUE)
plot(3:16, pch = 19, col = lut, cex = 3)

btupper/catecolors documentation built on May 13, 2019, 8:41 a.m.