Read access to the Alpha component as float value in range [0.0, 1.0].
Whether or not color value has changed.
Intended for resetting alteration status.
Read access to the Blue component as float value in range [0.0, 1.0].
Read access to the CMYK components as floating point 4-tuple, each value in range [0.0, 1.0].
Read access to the CMYKA components as floating point 5-tuple, each value in range [0.0, 1.0].
Read access to the Green component as float value in range [0.0, 1.0].
Read access to the RGB components as hexadecimal string.
Read access to the RGBA components as hexadecimal string.
Read access to the HSL components as floating point 3-tuple, each value in range [0.0, 1.0].
Read access to the HSLA components as floating point 4-tuple, each value in range [0.0, 1.0].
Read access to the LAB components as floating point 3-tuple, each value in range [0.0, 1.0].
Read access to the LABA components as floating point 4-tuple, each value in range [0.0, 1.0].
Read access to the Red component as float value in range [0.0, 1.0].
Read access to the RGB components as floating point 3-tuple, each value in range [0.0, 1.0].
Read access to the RGB components as array of three 32bit floats, each in range [0.0, 1.0].
Read access to the RGB components as array of three bytes (8bit unsigned int), each in range [0, 255].
Read access to the RGBA components as floating point 4-tuple, each value in range [0.0, 1.0].
Read access to the RGBA components as array of four 32bit floats, each in range [0.0, 1.0].
Read access to the RGBA components as array of four bytes (8bit unsigned int), each in range [0, 255].
Checks whether or not this color matches a second color (based on internal rgba floating representation).
Color to compare color values to.
Specifies the internal rgba store using a color in CMYK color space.
Cyan color component in [0.0, 1.0]
Magenta color component in [0.0, 1.0]
Yellow color component in [0.0, 1.0]
Key/Black color component in [0.0, 1.0]
Alpha color component in [0.0, 1.0]
Specifies the internal rgba store using a color in float (32bit) RGBA colors.
Red color component in [0.0, 1.0]
Green color component in [0.0, 1.0]
Blue color component in [0.0, 1.0]
Alpha color component in [0.0, 1.0]
Specifies the internal rgba store using a color in HSL color space.
Hue color component in [0.0, 1.0]
Saturation color component in [0.0, 1.0]
Lightness color component in [0.0, 1.0]
Alpha color component in [0.0, 1.0]
Specifies the internal rgba store using a hexadecimal color string.
Hexadecimal color string: red, green, blue, and alpha (optional) each in ['00', 'ff'].
Specifies the internal rgba store using a color in CIE-Lab color space.
Lightness color component in [0.0, 1.0]
Green-Red/a color component in [0.0, 1.0]
Blue-Yellow/b color component in [0.0, 1.0]
Alpha color component in [0.0, 1.0]
Specifies the internal rgba store using a color in RGB color space.
Red color component in [0.0, 1.0]
Green color component in [0.0, 1.0]
Blue color component in [0.0, 1.0]
Alpha color component in [0.0, 1.0]
Specifies the internal rgba store using a color in unsigned int (8bit) RGBA colors.
Red color component in [0, 255]
Green color component in [0, 255]
Blue color component in [0, 255]
Alpha color component in [0, 255]
Converts the color to a gray value using the specified algorithm.
The algorithm used for color to gray conversion.
Converts a color from HEX string to RGBA space. The hex string can start with '#' or '0x' or neither of these.
Hexadecimal color string: red, green, and blue, each in ['00', 'ff'].
Converts a hue value into an rgb value.
Performs a linear interpolation between x and y using a to weight between them within the specified color space.
First color stop for lerp/linear interpolation.
Second color stop for lerp/linear interpolation.
Specify the value to use to interpolate between x and y.
The color space that is to be used for linear interpolation of two colors.
Converts a color from RGB space to HEX string.
RGB color tuple: red, green, and blue, each in [0.0, 1.0]
Converts a color from RGBA space to HEX string.
RGBA color tuple: red, green, blue, and alpha, each in [0.0, 1.0]
Converts a float value to two-character HEX code.
A float value in [0.0, 1.0].
Color class that allows for specification and conversion of colors in various color spaces. Please not that most of the color conversion math is based on https://www.easyrgb.com/en/math.php. The internal color representation is a 4-tuple of GLclampf components in RGB color space and additional alpha. All color conversion, e.g., getters is computed on the fly, not cached, and is not optimized for, e.g., massive pixel processing.