View source: R/adjust_palette.R
| desaturate_ltc | R Documentation |
Reduce color saturation (make colors more gray).
desaturate_ltc(palette_name, amount = 0.5, which = NULL)
palette_name |
Character or unquoted name. Name of the ltc palette. |
amount |
Numeric. Desaturation amount (0 to 1). 0 = no change, 1 = completely gray. |
which |
Integer vector. Which colors to desaturate. If NULL (default), affects all colors. |
A vector of desaturated hex color codes with class "ltc"
# Desaturate entire palette
desaturate_ltc(luminaries, amount = 0.5)
# Desaturate only specific colors
desaturate_ltc("heatmap2", amount = 0.7, which = c(1, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.