Description Usage Arguments Value Examples
Continuous color palettes
1 2 3 4 5 6 7 8 | chroma_continuous_pal(
colors = c("yellow", "navy"),
mode = "lab",
padding = NULL,
correct_lightness = TRUE
)
bezier_continuous_pal(colors = c("yellow", "red", "black"))
|
colors |
Vector of hexadecimal strings or names for colors. |
mode |
Color space used for interpolation. |
padding |
Reduces the color range by cutting of a fraction of the gradient on both sides. If you pass a single number, the same padding will be applied to both ends. |
correct_lightness |
Makes sure the lightness range is spread evenly across a color scale. |
a function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | x <- seq(0, 1, length.out = 25)
view_cols(chroma_continuous_pal()(x))
# change mode
view_cols(chroma_continuous_pal(mode = "lch")(x))
# Bezier interpolation
view_cols(bezier_continuous_pal()(x))
# Color Brewer :
view_cols(chroma_continuous_pal("RdYlBu")(x))
# add some padding :
view_cols(chroma_continuous_pal("RdYlBu", padding = 0.15)(x))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.