| hcl.colors2 | R Documentation |
Create a vector of n contiguous colors.
hcl.colors2(n, palette = "viridis", start = 0, end = if (palette %in%
special.palettes) (n - 1)/n else 1, alpha, rev = FALSE)
inferno.colors(n, start = 0, end = 1, alpha, rev = FALSE)
plasma.colors(n, start = 0, end = 1, alpha, rev = FALSE)
viridis.colors(n, start = 0, end = 1, alpha, rev = FALSE)
gg.colors(n, start = 0, end = (n - 1)/n, alpha, rev = FALSE)
show.colors(x)
n |
the number of colors ( |
palette |
a valid palette name (one of |
alpha |
an alpha-transparency level in the range [0,1] (0 means transparent and 1 means opaque). |
rev |
logical indicating whether the ordering of the colors should be reversed. |
start |
a number in the range [0,1] at which the vector of colors begins. |
end |
a number in the range [0,1] at which the vector of colors ends. |
x |
a vector of colors to display. |
hcl.colors2 is a variant of hcl.colors that adds a
start and end argument. hcl.colors2 is slightly faster
than hcl.colors, though it is not by much.
For show.colors, its argument.
For all others, a character vector of n hex color codes.
show.colors(hcl.colors2(256, palette = "Spectral"))
show.colors(inferno.colors(256))
show.colors(plasma.colors(256))
show.colors(viridis.colors(256, end = 0.9))
show.colors(gg.colors(256))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.