chameleon v2.1.0 Chameleon.HSL

Link to this section Summary

Functions

Converts an hsl color to its rgb value

Link to this section Types

Link to this type t()
t() :: %Chameleon.HSL{h: integer(), l: integer(), s: integer()}

Link to this section Functions

Link to this function to_rgb(hsl)
to_rgb(Chameleon.HSL.t()) :: Chameleon.RGB.t() | {:error, String.t()}

Converts an hsl color to its rgb value.

Examples

iex> Chameleon.HSL.to_rgb(%Chameleon.HSL{h: 0, s: 100, l: 50})
%Chameleon.RGB{r: 255, g: 0, b: 0}