Skip to main content
https://travis-ci.org/ubernostrum/webcolors.svg?branch=master

webcolors is a Python (2.7, 3.5+) module for working with HTML/CSS color definitions.

Support is included for normalizing and converting between 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(u'#daa520')
u'goldenrod'

Implementations are also provided for the HTML5 color parsing and serialization algorithms. For example, parsing the infamous “chucknorris” string into an rgb() triplet:

>>> import webcolors
>>> webcolors.html5_parse_legacy_color(u'chucknorris')
HTML5SimpleColor(red=192, green=0, blue=0)

Full documentation is available online.

Metadata

Release files for webcolors 1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webcolors 1.11
File Size Uploaded
webcolors-1.11.tar.gz 309.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for webcolors 1.11
File Interpreter ABI Platform
webcolors-1.11-py3-none-any.whl Python 3 none any Details

Total release size: 319.3 kB

Release files / webcolors-1.11.tar.gz

Download URL webcolors-1.11.tar.gz
Size 309.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3ec5bdb25c21f6f859ff9523de10fb819ba9832caff4510268740c2c1f7e6a3d
BLAKE2b-256 checksum
How to use checksums
5b2feff94637271b087cbd76be7d644a1b3c6b8036a6fc93127e8613629324f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.1

Release files / webcolors-1.11-py3-none-any.whl

Download URL webcolors-1.11-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d51dee95a097812919eb445167a9c1887942cc3ecdfda4c5e50241d2376ed58b
BLAKE2b-256 checksum
How to use checksums
1f7edc100f3c92c3c910d3961163a8dec833c635e0fd54fd9ddb3560e27da86b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.1

Release history Release notifications | RSS feed

24.8.0

2 release files

1.13

2 release files

1.12

2 release files

1.11.1

2 release files

This release

1.11 This release

2 release files

1.10

2 release files

1.9.1

2 release files

1.9

2 release files

1.8.1

2 release files

1.8

1 release file

1.7

1 release file

1.5

1 release file

1.4

1 release file

1.3.1

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page