chameleon v2.0.1-pre1 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 Types
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
new(keyword)
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}
Converts a keyword color to its hex value.
Examples
iex> Chameleon.Keyword.to_hex(%Chameleon.Keyword{keyword: "Black"})
%Chameleon.Hex{hex: "000000"}
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(Chameleon.Keyword.t()) :: Chameleon.Pantone.t()
Converts a keyword color to its pantone value.
Examples
iex> Chameleon.Keyword.to_pantone(%Chameleon.Keyword{keyword: "Black"})
%Chameleon.Pantone{pantone: "30"}