Fledex.Color protocol (fledex v0.6.0)
View SourceProtocol that can be implemented to convert from some kind of color representation
to a color integer (colorint) with 3x8bit or to a 3 element tuple representing the colors
r, g, and b.
Summary
Functions
convert an abstract color to a concrete colorint
convert an abstract color to a concrete rgb tuple
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec to_colorint(term()) :: Fledex.Color.Types.colorint()
convert an abstract color to a concrete colorint
@spec to_rgb(term()) :: Fledex.Color.Types.rgb()
convert an abstract color to a concrete rgb tuple