TinyColor.OKLab (tiny_color v0.1.2)
Represents a color in the for of red, green, blue, and optional alpha
Link to this section Summary
Functions
Returns a string representation of this color.
Link to this section Functions
Link to this function
new(l, a, b, alpha \\ 1.0)
Link to this function
to_string(struct, type \\ nil)
Returns a string representation of this color.
Examples
iex> TinyColor.OKLab.to_string(%TinyColor.OKLab{l: 128.0, a: 47.0, b: 50.0})
"oklab(128, 47, 50)"
iex> TinyColor.OKLab.to_string(%TinyColor.OKLab{l: 128.0, a: 47.0, b: 50.0, alpha: 0.5})
"oklab(128, 47, 50, 0.5)"
iex> TinyColor.OKLab.to_string(%TinyColor.OKLab{l: 128.0, a: 47.0, b: 50.0}, :laba)
"oklab(128, 47, 50, 1.0)"
iex> TinyColor.OKLab.to_string(%TinyColor.OKLab{l: 128.0, a: 47.0, b: 50.0, alpha: 0.5}, :laba)
"oklab(128, 47, 50, 0.5)"