- n
The number of colors to generate.
- colorspace
A color space to generate colors from. Can be any of the
following:
A list that describes a color space in either
HSL or LCHab color space. In the first case (HSL), the list must
contain the following named vectors,
each of length two, giving a range for each item.
h
Hue, in range from -360 to 360
s
Saturation, in the range from 0 to 1
l
Lightness, in the range from 0 to 1
In the second case (LCHab), the list must contain the following
named vectors,
each of length two, giving a range for each item.
h
Hue, in range from -360 to 360
c
Chroma, in the range from 0 to infinity
l
Lightness, in the range from 0 to 100
In these cases, qualpal() will generate
A character vector of length one in
the form of "Source:Palette", where Domain is the name of a
source that provides a color palette, and Palette is the name of
a color palette from that source. See list_palettes() for
available palettes.
A matrix or data frame of RGB values (with values between 0 and
1).
cvd
Color vision deficiency adaptation. This must be a named
vector with names protan, deutan, and tritan and values
between 0 and 1, where 0 means no adaptation and 1 means full
adaptation.
cvd_severity
DEPRECATED. Use a named cvd vector instead, e.g.
c(protan = 0.5, deutan = 0.2, tritan = 0).
bg
Background color to consider (but not include) when
generating the palette. This is useful to avoid colors that are too
close to the background/canvas color. If NULL (the default), the
background color is not considered at all. Any color that is convertable
via col2rgb is acceptable, including hex colors.
metric
The color metric to use for the color distance
matrix.
extend
A palette of colors to use as a fixed set of initial
colors in the palette, which can be either a matrix or data frame
of RGB values (with values between 0 and 1) or a character vector
of hex colors (or any other format that's acceptable in
grDevices::col2rgb()).
white_point
The white point to use for color space conversions.
Can be one of "D65" (default, daylight at 6500K), "D50" (daylight at
5000K), "D55" (daylight at 5500K), "A" (incandescent tungsten at 2856K),
or "E" (equal energy).