chameleon v2.0.0 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 keyword_to_hex_map()
Link to this function keyword_to_rgb_map()
Link to this function to_cmyk(keyword)
to_cmyk(struct()) :: struct()

Converts a keyword color to its cmyk value.

Examples

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

Converts a keyword color to its hex value.

Examples

iex> Chameleon.Keyword.to_hex(%Chameleon.Keyword{keyword: "Black"})
%Chameleon.Hex{hex: "000000"}
Link to this function to_hsl(keyword)
to_hsl(struct()) :: struct()

Converts a keyword color to its hsl value.

Examples

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

Converts a keyword color to its pantone value.

Examples

iex> Chameleon.Keyword.to_pantone(%Chameleon.Keyword{keyword: "Black"})
%Chameleon.Pantone{pantone: "30"}
Link to this function to_rgb(keyword)
to_rgb(struct()) :: struct()

Converts a keyword color to its rgb value.

Examples

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