Description Usage Arguments Details Value Examples
These functions are replacements for colorRamp and colorRampPalette from the package grDevices, the only difference being that they also interpolate the alpha channel (i.e. transparency).
1 2 3 | colorRampPaletteAlpha(colors, ...)
colorRampAlpha(colors, bias = 1, interpolate = c("linear", "spline"))
|
colors |
colors to interpolate; must be a valid argument to |
... |
arguments to pass to |
bias |
a positive number. Higher values give more widely spaced colors at the high end. |
interpolate |
use spline or linear interpolation |
These functions are replacements for colorRamp
and colorRampPalette
from the
package grDevices. There are two differences: (i) these functions also interpolate the
alpha channel (i.e. transparency) and (ii) there is no space
parameter (only rgb
space is allowed).
For all the other details, see descriptions of the original package.
Both functions return a function which takes an integer argument.
For details, see description of colorRampPalette
1 | colorRampPaletteAlpha( c( "#FF000033", "#00FF0099" ) )( 5 )
|
[1] "#FF000033" "#BF3F004C" "#7F7F0066" "#3FBF007F" "#00FF0099"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.