Fledex.Color.Types (fledex v0.8.0)

Copy Markdown View Source

A couple of color related type definitions.

Summary

Types

An integer representing the rgb encoded in the classical hex way: 0xrrggbb. It's also possible to add a value for a potentialy white led (rgbw) encoded as 0xwwrrggbb or even 2 white leds 0xw2w2w1w1rrggbb (as used in a ws2805)

Types

color()

color_any()

@type color_any() :: color() | hsv() | hsl()

colorint()

@type colorint() :: 0..1_099_511_627_775

An integer representing the rgb encoded in the classical hex way: 0xrrggbb. It's also possible to add a value for a potentialy white led (rgbw) encoded as 0xwwrrggbb or even 2 white leds 0xw2w2w1w1rrggbb (as used in a ws2805)

hsl()

@type hsl() :: Fledex.Color.HSL.t()

hsv()

@type hsv() :: Fledex.Color.HSV.t()

rgb()

@type rgb() :: {red :: byte(), green :: byte(), blue :: byte()}