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.3.1.tar.gz (6.4 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for webcolors-1.3.1.tar.gz
Algorithm Hash digest
SHA256 17691c51d1b2c08d238c432bd39fc4d78de543bb369ddff87c4b46ed07f07427
MD5 aeb4f33be6c26ec7f76a78c2d88cfb0c
BLAKE2b-256 bfe53089976014994fe02d82c6ec0dd9acfe6b796734db437d503715a757008b

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