Shifts each colour's HSL lightness by amount, clamped to [0, 1].
color_lighten() and color_darken() shift in opposite directions by
the same amount – there is no single signed-amount function,
since separate verbs read more clearly at a call site.
See also
Other color helpers:
color_alpha(),
color_greyscale(),
color_invert(),
color_jitter(),
color_mix(),
color_rotate_hue(),
color_saturate()
Examples
color_lighten("steelblue", amount = 0.2)
#> [1] "#8DB3D3"
color_darken(palette_manual(index = 1), amount = 0.15)
#> [1] "#1E3C52" "#4C9AC5" "#141F26" "#CE8709" "#B4450A"
draw(effect_swatch(color = color_lighten("steelblue", amount = seq(0, 0.4, 0.1))))