Description Usage Arguments Value Author(s) See Also Examples
dpal creates divergent color palettes using the HCL color space.
Divergent color palettes consist of a gradient that goes from dark to
light to dark where both ends of the gradient are a separate hue.
Divergent color palettes  are suitable when low and high values are of
importance, but middle range values are less important.
| 1 2 | 
| n | number of colors to create | 
| hue | vector of length 2 giving the first and second hues to use | 
| chroma | chroma value for palette | 
| luminance | vector of length 2 giving the start and end bounds for the range of luminance 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  | 
dpal returns a vector of hex colors
Michael Malick
| 1 2 3 4 5 6 7 8 9 10 11 12 | plotpal(dpal(200))
plotpal(dpal(200, luminance = c(30, 90)))
plotpal(dpal(200, luminance = c(30, 90), power = 2))
plotpal(dpal(200, luminance = c(30, 90), power = 0.8))
plotpal(dpal(200, hue = c(100, 240)))
plotpal(dpal(200, hue = c(40, 240), luminance = c(30, 90)))
mat <- matrix(c(rnorm(100), rnorm(100) + 1, rnorm(100) + 2,
    rnorm(100) + 3),
              ncol = 4)
image(z = mat, col = dpal(200), axes = FALSE)
box()
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.