Provides pre-designed colorpalettes (character vectors containing R built-in colors) of this and several other R packages (grDevices, RColorBrewer, colorRamps) as well as custom-made ones.
colorpalette(
colpal,
nrcol = NULL,
simulate = FALSE,
daltonize = FALSE,
cvd = "p",
alpha = NULL,
rev = FALSE
)
a character vector containing R built-in color names or a name of a LSD
colorpalette as a character string (see disco() or disco
).
a non-negative integer specifying the number of colors to be used (defaults to length of colpal
, if not specified).
logical: if TRUE
(FALSE
by default), a converted colorpalette is returned to simulate dichromat vision according to http://www.daltonize.org (see daltonize
).
logical: if TRUE
(FALSE
by default), a converted colorpalette is returned to enhance dichromat vision according to http://www.daltonize.org (see daltonize
).
character string implying the type of color vision deficiency ("p" for protanope, "d" for deuteranope or "t" for tritanope).
alpha value: a two-digit integer between 01 and 99 for color opacity, i.e. appearance of partial or full transparency (usage omitted by default).
logical: if TRUE
(FALSE
by default), a reversed colorpalette is returned.
colorpalette
returns a vector containing R built-in colors in hexadecimal representation.
# NOT RUN {
colorpalette("heat")
colorpalette(c("darkred","grey","darkblue"),10)
# }
Run the code above in your browser using DataLab