Fledex.Color.RGB (fledex v0.7.0)
View SourceThis module represents an RGB color. Fledex does commonly use a {r, g, b}-tuple, but
this module makes the purpose more clear.
It also provides the necessary conversion functions to the 0xrrggbb (colorint) and{r,g,b} (tuple) representations.
Summary
Functions
creates a new RGB structure from any kind of color structure
Converts an Fledex.Color.RGB color to a rgb tuple
Types
Functions
@spec new(Fledex.Color.Types.color()) :: t()
creates a new RGB structure from any kind of color structure
@spec to_tuple(t() | Fledex.Color.Types.color()) :: Fledex.Color.Types.rgb()
Converts an Fledex.Color.RGB color to a rgb tuple