chameleon v2.0.1-pre3 Chameleon.CMYK

Link to this section Summary

Functions

Converts a cmyk color to its rgb value

Link to this section Types

Link to this type t()
t() :: %Chameleon.CMYK{c: integer(), k: integer(), m: integer(), y: integer()}

Link to this section Functions

Link to this function new(c, m, y, k)
Link to this function to_rgb(cmyk)
to_rgb(Chameleon.CMYK.t()) :: Chameleon.RGB.t() | {:error, String.t()}

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}