chameleon v1.0.3 Chameleon.Keyword

Link to this section Summary

Functions

Converts a keyword color to its cmyk value

Converts a keyword color to its hex value

Converts a keyword color to its hsl value

Converts a keyword color to its pantone value

Converts a keyword color to its rgb value

Link to this section Functions

Link to this function to_cmyk(keyword)
to_cmyk(charlist()) :: [integer()]

Converts a keyword color to its cmyk value.

Examples

iex> Chameleon.Keyword.to_cmyk("Red")
%{c: 0, m: 100, y: 100, k: 0}
Link to this function to_hex(keyword)
to_hex(charlist()) :: charlist()

Converts a keyword color to its hex value.

Examples

iex> Chameleon.Keyword.to_hex("Black")
"000000"
Link to this function to_hsl(keyword)
to_hsl(charlist()) :: [integer()]

Converts a keyword color to its hsl value.

Examples

iex> Chameleon.Keyword.to_hsl("Red")
%{h: 0, s: 100, l: 50}
Link to this function to_pantone(keyword)
to_pantone(charlist()) :: charlist()

Converts a keyword color to its pantone value.

Examples

iex> Chameleon.Keyword.to_pantone("Black")
"30"
Link to this function to_rgb(value)
to_rgb(charlist()) :: [integer()]

Converts a keyword color to its rgb value.

Examples

iex> Chameleon.Keyword.to_rgb("Red")
%{r: 255, g: 0, b: 0}