Generate a color palette. For discrete palettes, hex values are standard up
to n = 100, but for larger values of n, they are generated using
Polychrome::createPalette().
Arguments
- type
A character string indicating the palette type. Permitted values are "discrete" and "gradient". Defaults to discrete.
- n
Number of colors. Default =
NULLwill return all of the pre-set colors in the palette.- palette
A character string indicating the palette name. Permitted values are "choir", "archr", "inferno", and "frozen". Default =
NULLwill use "choir" for discrete colors and "inferno" for gradient colors. Alternately, provide a vector of color values to use as starting values for the color palette.- swatch
A Boolean value indicating whether to plot a swatch of the palette.
