chameleon v2.0.1-pre3 Chameleon.Pantone

Link to this section Summary

Functions

Converts a pantone color to its hex value

Converts a pantone color to its rgb value

Link to this section Types

Link to this type t()
t() :: %Chameleon.Pantone{pantone: String.t()}

Link to this section Functions

Link to this function pantone_to_hex_map()
Link to this function to_hex(pantone)
to_hex(Chameleon.Pantone.t()) ::
  Chameleon.Hex.t() |
  {:error, String.t()}

Converts a pantone color to its hex value.

Examples

iex> Chameleon.Pantone.to_hex(%Chameleon.Pantone{pantone: "30"})
%Chameleon.Hex{hex: "000000"}
Link to this function to_rgb(pantone)
to_rgb(Chameleon.Pantone.t()) ::
  Chameleon.RGB.t() |
  {:error, String.t()}

Converts a pantone color to its rgb value.

Examples

iex> Chameleon.Pantone.to_rgb(%Chameleon.Pantone{pantone: "30"})
%Chameleon.RGB{r: 0, g: 0, b: 0}