Can be used to modify an existing palette, e.g. change brightness, or to generate a palette for a response vector.
get_color(x, ...)# S3 method for default
get_color(x, s, v, alpha, ...)
# S3 method for factor
get_color(x, levels = FALSE, col = "Set1", ...)
Character vector of colors or factor of class memberships to generate colors for.
Sent to get_color.default
.
Saturation. s = 0
leaves it unchanged, 0 < s <= 1
increases, and -1 <= s < 0
decreases.
Value. s = 0
leaves it unchanged, 0 < s <= 1
increases, and -1 <= s < 0
decreases.
Transparency.
If TRUE
a palette with one color per level of x
is returned. If FALSE
one color per element in x
is returned.
Color palette with one color per class or the name of the color
brewer palette to use, see name
argument of brewer.pal
for a list of possible values.
A character vector of hex colors.