A numeric vector or matrix containing values to be mapped to colors.
palette
A vector of colors used as the palette. By default,
hcl.colors(30) is used.
na.color
Color used for NA values. Defaults to white.
Details
Values in x are rescaled to the range of the palette using
scales::rescale(), and each value is mapped to a corresponding
color. If x is a matrix, the resulting raster preserves the same
dimensions.