chameleon v2.0.1-pre1 Chameleon.HSL

Link to this section Summary

Functions

Converts an hsl color to its cmyk value

Converts an hsl color to its hex value

Converts an hsl color to its rgb value

Converts an hsl color to its rgb value

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

Converts an hsl color to its cmyk value.

Examples

iex> Chameleon.HSL.to_cmyk(%Chameleon.HSL{h: 0, s: 100, l: 50})
%Chameleon.CMYK{c: 0, m: 100, y: 100, k: 0}

Converts an hsl color to its hex value.

Examples

iex> Chameleon.HSL.to_hex(%Chameleon.HSL{h: 0, s: 100, l: 50})
%Chameleon.Hex{hex: "FF0000"}

Converts an hsl color to its rgb value.

Examples

iex> Chameleon.HSL.to_keyword(%Chameleon.HSL{h: 0, s: 0, l: 0})
%Chameleon.Keyword{keyword: "black"}

Converts an hsl color to its rgb value.

Examples

iex> Chameleon.HSL.to_pantone(%Chameleon.HSL{h: 0, s: 0, l: 0})
%Chameleon.Pantone{pantone: "30"}

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}