Skip to main content

A library for working with color names and color value formats defined by the HTML and CSS specifications for use in documents on the Web.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webcolors-1.4.tar.gz (7.8 kB view details)

Uploaded Source

File details

Details for the file webcolors-1.4.tar.gz.

File metadata

  • Download URL: webcolors-1.4.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for webcolors-1.4.tar.gz
Algorithm Hash digest
SHA256 304fc95dab2848c7bf64f378356766e692c2f8b4a8b15fa3509544e6412936e8
MD5 35de9d785b5c04a9cc66a2eae0519254
BLAKE2b-256 d75da1e10db416729a4a151470aead3cf68e0595e7ffbe1ede59c3092c9da773

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page