chameleon v2.0.0 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 new(c, m, y, k)
Link to this function to_hex(cmyk)
to_hex(struct()) :: struct()

Converts a cmyk color to its hex value.

Examples

iex> Chameleon.Cmyk.to_hex(%Chameleon.Cmyk{c: 100, m: 0, y: 100, k: 0})
%Chameleon.Hex{hex: "00FF00"}
Link to this function to_hsl(cmyk)
to_hsl(struct()) :: struct()

Converts a cmyk color to its hsl value.

Examples

iex> Chameleon.Cmyk.to_hsl(%Chameleon.Cmyk{c: 100, m: 0, y: 100, k: 0})
%Chameleon.Hsl{h: 120, s: 100, l: 50}
Link to this function to_keyword(cmyk)
to_keyword(struct()) :: struct()

Converts a cmyk color to its rgb value.

Examples

iex> Chameleon.Cmyk.to_keyword(%Chameleon.Cmyk{c: 100, m: 0, y: 100, k: 0})
%Chameleon.Keyword{keyword: "lime"}
Link to this function to_pantone(cmyk)
to_pantone(struct()) :: struct()

Converts a cmyk color to its pantone value.

Examples

iex> Chameleon.Cmyk.to_pantone(%Chameleon.Cmyk{c: 0, m: 0, y: 0, k: 100})
%Chameleon.Pantone{pantone: "30"}
Link to this function to_rgb(cmyk)
to_rgb(struct()) :: struct()

Converts a cmyk color to its rgb value.

Examples

iex> Chameleon.Cmyk.to_rgb(%Chameleon.Cmyk{c: 100, m: 0, y: 100, k: 0})
%Chameleon.Rgb{r: 0, g: 255, b: 0}