Source

webcolors /

Filename Size Date modified Message
docs
47 B
373 B
1.6 KB
20 B
492 B
1002 B
23.9 KB

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')
'goldenrod'

Full documentation is available online.