chameleon v1.0.3 Chameleon.Hex
Link to this section Summary
Functions
Converts a hex color to its cmyk value
Converts a hex color to its hsl value
Converts a hex color to its keyword value
Converts a hex color to its pantone value
Converts a hex color to its rgb value
Link to this section Functions
Link to this function
keyword_to_hex_map()
Link to this function
pantone_to_hex_map()
Link to this function
rgb_values(rgb_map)
Converts a hex color to its cmyk value.
Examples
iex> Chameleon.Hex.to_cmyk("FF0000")
%{c: 0, m: 100, y: 100, k: 0}
Converts a hex color to its hsl value.
Examples
iex> Chameleon.Hex.to_hsl("FF0000")
%{h: 0, s: 100, l: 50}
Converts a hex color to its keyword value.
Examples
iex> Chameleon.Hex.to_keyword("FF00FF")
"fuchsia"
iex> Chameleon.Hex.to_keyword("6789FE")
{:error, "No keyword match could be found for that hex value."}