values_to_colors.RdConvert values to colors along a color ramp
values_to_colors(
x,
min_val = NULL,
max_val = NULL,
colorset = c("darkblue", "dodgerblue", "gray80", "orange", "orangered"),
missing_color = "black"
)a numeric vector to be converted to colors
a number that's used to set the low end of the color scale (default = 0)
a number that's used to set the high end of the color scale. If NULL (default), use the highest value in x
a set of colors to interpolate between using colorRampPalette (default = c("darkblue","dodgerblue","gray80","orangered","red"))
a color to use for missing (NA) values.
a character vector of hex color values generated by colorRampPalette. Color values will remain in the same order as x.