set_hue¶
- set_hue(color, hue, space='hcl')[source]¶
Return a color with a different hue and the same luminance and saturation as the input color.
- Parameters
color (color-spec) – The color. Sanitized with
to_rgba
.hue (float, optional) – The new hue. Should lie between
0
and360
degrees.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_saturation
,set_luminance
,set_alpha
,shift_hue
,scale_saturation
,scale_luminance