Description Usage Arguments Note
View source: R/color_palette.R
Construct a new color palette
1 2 3 | color_palette(pal, n, type = c("discrete", "continuous"))
is_color_palette(pal)
|
pal |
A character vector of color hex codes. |
n |
(optional) number to indicate how many values to include in the color palette. |
If type
is set to "discrete"
, n
cannot be greater than the number of unique values in pal
. n
can be greater than number of unqiue values in pal
when type = "continuous"
. In the latter case, colors are interpolated with grDevices::colorRampPalette()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.