Skip to contents

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.

Usage

color_greyscale(color)

Arguments

color

A character vector of colours.

Value

A character vector of hex colour strings, the same length as color.

Examples

color_greyscale(palette_manual(index = 1))
#> [1] "#5F5F5F" "#AFAFAF" "#444444" "#929292" "#868686"
draw(effect_swatch(color = color_greyscale(palette_manual(index = 1))))