Description Usage Arguments Value Examples
View source: R/single-colorscale.R
Create a color scale from a single color
1 2 3 4 5 6 7 8 9 10 11 | create_single_scale(
color,
n_light = 6,
n_dark = 4,
lightness = 0.8,
darkness = 0.5,
rotate_light = 67,
rotate_dark = -51,
saturation_light = 0.2,
saturation_dark = 0.14
)
|
color |
Hexadecimal string or a name of a color. |
n_light |
Number of light colors to generate. |
n_dark |
Number of dark colors to generate. |
lightness |
Percentage of lightness ( |
darkness |
Percentage of darkness ( |
rotate_light |
Rotate coefficient in HSL space for light colors ( |
rotate_dark |
Rotate coefficient in HSL space for dark colors ( |
saturation_light |
Saturation percentage in HSL space for light colors ( |
saturation_dark |
Saturation percentage in HSL space for dark colors ( |
a vector of n_light + n_dark + 1
colors.
1 2 3 4 | create_single_scale(color = "#1D9A6C")
# display in viewer
view_cols(create_single_scale(color = "#1D9A6C"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.