Fledex.Color protocol (fledex v0.7.0)

View Source

Protocol that can be implemented to convert from some kind of color representation

The conversionto can either happen to a color integer (colorint) with 3x 8bit or to a 3 element {r, g, n} tuple representing the colors r, g, and b.

Summary

Types

t()

All the types that implement this protocol.

Functions

convert an abstract color to a concrete colorint

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

to_colorint(color)

@spec to_colorint(term()) :: Fledex.Color.Types.colorint()

convert an abstract color to a concrete colorint