chameleon v1.0.3 Chameleon.Cmyk

Link to this section Summary

Functions

Converts a cmyk color to its hex value

Converts a cmyk color to its hsl value

Converts a cmyk color to its rgb value

Converts a cmyk color to its pantone value

Converts a cmyk color to its rgb value

Link to this section Functions

Link to this function to_hex(cmyk)
to_hex([integer()]) :: charlist()

Converts a cmyk color to its hex value.

Examples

iex> Chameleon.Cmyk.to_hex([100, 0, 100, 0])
"00FF00"
Link to this function to_hsl(cmyk)
to_hsl([integer()]) :: [integer()]

Converts a cmyk color to its hsl value.

Examples

iex> Chameleon.Cmyk.to_hsl([100, 0, 100, 0])
%{h: 120, s: 100, l: 50}
Link to this function to_keyword(cmyk)
to_keyword([integer()]) :: charlist()

Converts a cmyk color to its rgb value.

Examples

iex> Chameleon.Cmyk.to_keyword([100, 0, 100, 0])
"lime"
Link to this function to_pantone(cmyk)
to_pantone([integer()]) :: charlist()

Converts a cmyk color to its pantone value.

Examples

iex> Chameleon.Cmyk.to_pantone([0, 0, 0, 100])
"30"
Link to this function to_rgb(cmyk)
to_rgb([integer()]) :: [integer()]

Converts a cmyk color to its rgb value.

Examples

iex> Chameleon.Cmyk.to_rgb([100, 0, 100, 0])
%{r: 0, g: 255, b: 0}