Flextime
DocColor
Not logged in

The colors module provides facilities for specifying colors by name or in alternate color spaces.

color(name) (global function)

Tries to parse name as an English color name. This uses a combination of the ACNS color naming system {Kaufman 1986} and the XKCD color name survey {Munroe 2010}. This combination allows you to use natural color names such as "blue", "yellow-green", "light gold", or "deep grayish tan". For full details on how color naming works, see below; ideally, however, you should just try whatever color name comes to mind and see if the result is what you want.

Color.commonColor(name)

Searches for name in the approx. 1000 most common color names from the XKCD color survey. Some examples of XKCD color names: "green", "light blue", and "olive". More exotic names include "dark pastel green", "macaroni and cheese", and "vomit". This function directly accesses the XKCD table, and does not allow ACNS modifiers.

Color naming system

The color naming system is a combination of a set of approx. 1000 color names, determined by random sampling, and a small set of modifiers. Color names consist of a sequence of modifiers, followed by a base color name. Modifiers are optional, but there must always be a base color name.

A base color name can take one of three forms:

There are four kinds of modifiers: