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.
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)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
304fc95dab2848c7bf64f378356766e692c2f8b4a8b15fa3509544e6412936e8
|
|
| MD5 |
35de9d785b5c04a9cc66a2eae0519254
|
|
| BLAKE2b-256 |
d75da1e10db416729a4a151470aead3cf68e0595e7ffbe1ede59c3092c9da773
|