Along with the ColorSwatchData and ColorSwatchGroup types these utility functions were introduced to handle colors. The functions are defined in the lib_colorchooser.h
header file.
These functions convert a given RGB color value to a formatted String:
The following functions allow easy conversion of colors stored in different formats.
These functions convert float colors (0.0 ... 1.0) to 8-bit colors (0 .. 255):
These functions convert float colors (0.0 ... 1.0) to 16-bit colors (0 .. 65536):
Also, a Kelvin color temperature can be converted:
These functions are used to calculate color palettes based on the given input color.