Fledex.Color protocol (fledex v0.6.0)

View Source

Protocol 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

Types

t()

All the types that implement this protocol.

Functions

convert an abstract color to a concrete colorint

convert an abstract color to a concrete rgb tuple

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

to_rgb(color)

@spec to_rgb(term()) :: Fledex.Color.Types.rgb()

convert an abstract color to a concrete rgb tuple