parse_hsl
Parse raw hue, saturation, lightness, and alpha values and convert to RGBA.
def parse_hsl(
h: str,
h_units: str,
sat: str,
light: str,
alpha: float | None = None
) - > RGBA
Parse raw hue, saturation, lightness, and alpha values and convert to RGBA.
Parameters
| Name | Type | Description |
|---|---|---|
| h | str | The raw hue value to be converted. |
| h_units | str | The unit of measurement for the hue value, such as 'deg', 'rad', or 'turns'. |
| sat | str | The saturation percentage value. |
| light | str | The lightness percentage value. |
| alpha | `float | None` = None |
Returns
| Type | Description |
|---|---|
RGBA | An instance of RGBA containing the converted color components and the parsed alpha transparency. |