Module color

Source
Expand description

Color generation.

This is similar to Consistent Color Generation defined in XEP-0392, but uses OKLCh colorspace instead of HSLuv to ensure that colors have the same lightness.

Functions§

color_int_to_hex_string
Returns color as a “#RRGGBB” String where R, G, B are hex digits.
rgb_to_u32 🔒
Converts RGB tuple to a 24-bit number.
str_to_angle 🔒
Converts an identifier to Hue angle.
str_to_color
Converts an identifier to RGB color.