set_saturation¶
- set_saturation(color, saturation, space='hcl')[source]¶
Return a color with a different saturation and the same hue and luminance as the input color.
- Parameters
color (color-spec) – The color. Sanitized with
to_rgba.saturation (float, optional) – The new saturation. Should lie between
0and360degrees.space ({‘hcl’, ‘hpl’, ‘hsl’, ‘hsv’}, optional) – The hue-saturation-luminance-like colorspace used to transform the color. Default is the perceptually uniform colorspace
'hcl'.
- Returns
color (str) – A HEX string.
See also
set_hue,set_luminance,set_alpha,shift_hue,scale_saturation,scale_luminance