colour.color

Color Library.

This module defines several color formats that can be converted to one or another.

Formats

HSL:

3-uple of Hue, Saturation, Lightness all between 0.0 and 1.0

RGB:

3-uple of Red, Green, Blue all between 0.0 and 1.0

HEX:

string object beginning with ‘#’ and with red, green, blue value. This format accept color in 3 or 6 value ex: ‘#fff’ or ‘#ffffff’

WEB:

string object that defaults to HEX representation or human if possible

Usage

Several function exists to convert from one format to another. But all function are not written. So the best way is to use the object Color.

Please see the documentation of this object for more information.

Note

Some constants are defined for convenience in HSL, RGB, HEX

Functions

RGB_color_picker(obj)

Build a color representation from the string representation of an object.

make_color_factory(**kwargs_defaults)

Create a factory of Color with given defaults.

Classes

C_HEX()

RGB colors container.

C_HSL()

HSL colors container.

C_RGB()

RGB colors container.

Color(color, pick_for, picker, Color] =, ...)

Abstraction of a color object.