Description Usage Arguments Value Author(s) See Also Examples
spal
creates sequential color palettes using the HCL color space.
Sequential color palettes are composed of a gradient of colors where the
gradient can include a range of hues, luminance values, or chroma values.
Sequential color palettes are suitable for encoding continuous variables
where either low or high values are of importance, but not both.
1 2 |
n |
number of colors to create |
hue.start |
starting hue value, should be in the interval [0, 360] |
hue.end |
ending hue value, should be in the interval [0, 360]. |
luminance |
vector of length 2 giving the start and end bounds for the range of luminance values |
chroma |
vector of length 2 giving the start and end bounds for the range of chroma values |
power |
parameter to control how chroma and luminance increase/decrease |
alpha |
transparency level defined on the interval [0, 1] where 0 = transparent and 1 = opaque |
fixup |
logical, should RGB value be corrected (see |
spal
returns a vector of hex colors
Michael Malick
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | plotpal(spal(140))
plotpal(spal(140, luminance = c(20, 80)))
plotpal(spal(140, hue.start = 235, hue.end = 70))
plotpal(spal(140, hue.start = 235, hue.end = 70, luminance = c(20, 80)))
image(t(volcano)[ncol(volcano):1,], col = spal(100))
image(t(volcano)[ncol(volcano):1,], col = spal(100, hue.end = 70))
plotpal(spal(140, power = 0.8))
plotpal(spal(140, power = 1))
plotpal(spal(140, power = 1.3))
plotpal(spal(140, power = 1.5))
plotpal(spal(140, hue.start = 260, chroma = c(80, 0),
luminance = c(30, 90), power = 1.5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.