convert_color: Convert Color
Usage
convert_color(color, as_hex = FALSE, single = FALSE)
Value
RGB or RGBA color vector, or a color matrix for multiple colors.
Arguments
- color
The color to convert. Can be either an R color string, or a
numeric scalar, RGB vector, RGBA vector, or RGB/RGBA matrix with values
between 0 and 1.
- as_hex
Default FALSE. If TRUE, return hex colors.
- single
Default FALSE. If TRUE, require exactly one color.