colour_ramp {scales} | R Documentation |
Returns a function that maps the interval [0,1] to a set of colors.
Interpolation is performed in the CIELAB color space. Similar to
colorRamp(space = 'Lab')
, but hundreds of
times faster, and provides results in "#RRGGBB"
(or
"#RRGGBBAA"
) character form instead of RGB color matrices.
colour_ramp(colors, na.color = NA, alpha = FALSE)
colors |
Colors to interpolate; must be a valid argument to
|
na.color |
The color to map to |
alpha |
Whether to include alpha channels in interpolation; otherwise,
any alpha information will be discarded. If |
A function that takes a numeric vector and returns a character vector of the same length with RGB or RGBA hex colors.