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 withto_rgba.alpha (
float, optional) – The new opacity. Should be between0and1.
- Returns:
color (
str) – An 8-digit HEX string indicating the red, green, blue, and alpha channel values.
See also
set_hue,set_saturation,set_luminance,shift_hue,scale_saturation,scale_luminance