LSD (version 4.0-0)

distinctcolors: Find preferably distinct R built-in colors

Description

Find a vector of distinct R built-in colors for a pre-defined length ('nrcol').

Usage

distinctcolors(nrcol = 10, method = "RGB", bw = FALSE, show = TRUE,
  simulate = TRUE)

Arguments

nrcol

a non-negative integer specifying the number of colors to be used (defaults to the length of 10, if not specified).

method

character string implying the method for color selection to be used ("RGB" uses a grid in the RGB space (default), "Lab" uses a grid in the Lab space, "goldenratio" uses the golden ratio as spacing between colors in the HSV color space).

bw

logical: if TRUE (FALSE by default), the colors "black" and "white" are removed from the resulting colorpalette.

show

logical: if TRUE (by default), the resulting colorpalettes are depicted in an R plot.

simulate

logical: if TRUE (by default), a converted colorpalettes are additionally depicted to simulate dichromat vision according to http://www.daltonize.org (see daltonize).

Value

distinctcolors returns a vector containing R built-in colors in hexadecimal representation.

See Also

disco, colorpalette, demotour

Examples

Run this code
# NOT RUN {
distinctcolors()
# }

Run the code above in your browser using DataCamp Workspace