A thin wrapper around color_desaturate() with amount = 1 – every
colour's HSL saturation is dropped to 0, leaving only its own
lightness. This is a plain HSL desaturation, not a perceptual
(luminance-weighted) greyscale conversion – two colours with very
different perceived brightness but the same HSL lightness (e.g. a
saturated yellow and a saturated blue) convert to the same grey.
See also
Other color helpers:
color_alpha(),
color_invert(),
color_jitter(),
color_lighten(),
color_mix(),
color_rotate_hue(),
color_saturate()
Examples
color_greyscale(palette_manual(index = 1))
#> [1] "#5F5F5F" "#AFAFAF" "#444444" "#929292" "#868686"
draw(effect_swatch(color = color_greyscale(palette_manual(index = 1))))