Source

webcolors /

Filename Size Date modified Message
docs
47 B
469 B
1.5 KB
16 B
490 B
998 B
27.4 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.