Applies a palette to a data vector to yield a vector of colors.
use_color_pal(data_values, pal, color_NA = "white", indices = FALSE)
A character vector of color names (or integers if indices
).
The values to map to colors
The palette to use to map values to colors
The color to use for NA
values. Default: "white"
.
Return the numeric indices of colors in pal$value
rather than the colors themselves. A value of 0
will be used for
missing data. Default: FALSE
.
Other coloring:
ROY_BIG_BL()
,
expand_color_pal()
,
make_color_pal()