set_alpha¶
- set_alpha(color, alpha)[source]¶
Return a color with the opacity channel set to the specified value.
- Parameters
color (color-spec) – The color. Sanitized with
to_rgba.alpha (float, optional) – The new opacity. Should be between
0and1.
- Returns
color (str) – A HEX string.
See also
set_hue,set_saturation,set_luminance,shift_hue,scale_saturation,scale_luminance