image

the sleepy snake

index :: html :: Colors

The colors module provides methods and constants to work with html colors. The module is not available from the top of the package, import it if required instead.

The colors module provides the following methods:

color(r, g, b) constructs a html color from the specified r, g, b values
color_to_rgb(html_color) extracts the red, green and blue portions from a html color
is_browser_save(html_color) checks if a color is "browser save"
make_browser_save(html_color) converts a color to the closes matching "browser save color"

The color module provides the following submodules:

vga(16) named vga colors as constants
x11(140) named x11 colors as constants