webcolors /

Filename Size Date modified Message
47 B
Add initial conversion of documentation to Sphinx.
515 B
Added tag v1.4 for changeset 510b7741da98
1.5 KB
I now have commits in 2012.
16 B
Fix filename of license file in
490 B
Call it 1.4.
998 B
Call it 1.4.
27.4 KB
And update tests to get back to 100% coverage while I'm in there.

Support is included for the following formats (RGB colorspace only; conversion to/from HSL can be handled by the colorsys module in the Python standard library):

  • Specification-defined color names
  • Six-digit hexadecimal
  • Three-digit hexadecimal
  • Integer rgb() triplet
  • Percentage rgb() triplet

For example:

>>> import webcolors
>>> webcolors.hex_to_name('#daa520')

Full documentation is available online.