View Source Colorex.Color (Colorex v1.0.0)
Struct that represents a type opaque color. Automatically handles colorspace conversions and will keep the same color format as you used to create it.
Summary
Types
This struct encapsulates a color and handles it's internal colorspace representation/conversions.
Types
@type color() :: t() | colorspace_color()
@type color_key() ::
:red
| :green
| :blue
| :alpha
| :hue
| :saturation
| :lightness
| :l
| :a
| :b
| :cyan
| :magenta
| :yellow
| :black
| :x
| :y
| :z
@type colorspace_color() :: Colorex.RGB.t() | Colorex.HSL.t() | Colorex.LAB.t() | Colorex.XYZ.t() | Colorex.CMYK.t()
@type float_0_to_1() :: float()
@type integer_0_to_255() :: pos_integer()
@type rgba_tuple() :: {integer_0_to_255(), integer_0_to_255(), integer_0_to_255(), float_0_to_1()}
@opaque t()
This struct encapsulates a color and handles it's internal colorspace representation/conversions.