NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #503 most downloaded on PyPI
A library for working with the color formats defined by HTML and CSS.
Last release 11 months ago
31 Oct 2025
Ships fairly regularly
a new release about every 12 months
Nearly every release is documented
notes for 21 of 22 stable releases
1 version withdrawn
withdrawn after publishing
18 years old
23 releases · first in 2008
Supported Python versions are now 3.10, 3.11, 3.12, 3.13, and 3.14.
Released October 2025
Supported Python versions are now 3.10, 3.11, 3.12, 3.13, and 3.14.
The package's tests now run with pytest.
Correct an error with specifying the version in the 24.11.0 package. The version number of the package was accidentally defined in two places, and the
Released November 2024
Correct an error with specifying the version in the 24.11.0 package. The version number of the package was accidentally defined in two places, and they were out of sync. The extra definition has been removed. The 24.11.0 package has been yanked from PyPI to prevent problems.
One column per quarter.
Supported Python versions are now 3.9, 3.10, 3.11, 3.12, and 3.13.
Released November 2024
Supported Python versions are now 3.9, 3.10, 3.11, 3.12, and 3.13.
Added the ~webcolors.names function to allow retrieving lists of color names. The underlying mappings of color names/values still are not supported AP
Released August 2024
Added the ~webcolors.names function to allow retrieving lists of color names. The underlying mappings of color names/values still are not supported API; to obtain the color value corresponding to a name, use the appropriate conversion function.
Supported Python versions are now 3.8, 3.9, 3.10, and 3.12.
Released June 2024
Supported Python versions are now 3.8, 3.9, 3.10, and 3.12.
Running the unit tests no longer uses a third-party test runner; the standard-library unittest module's runner is used instead.
Documentation of the HTML5 color algorithms has been updated to emphasize which HTML5 spec is used (the WHATWG spec, which is now the only canonical and maintained HTML5 spec) and comments in the implementations have been updated to include the latest prose description of the HTML5 algorithms from the spec. These updates do not change the behavior of the HTML5 algorithms, and are only for clarity of documentation and explanation.
Adopted CalVer versioning.
The raw mappings of color names/values are no longer publicly exposed; use the appropriate normalizing conversion functions instead of accessing the mappings directly.
Supported Python versions are now 3.7, 3.8, 3.9, 3.10, and 3.11.
Released March 2023
Supported Python versions are now 3.7, 3.8, 3.9, 3.10, and 3.11.
The codebase was significantly reorganized and modernized. Public API is unchanged. Imports should continue to be directly from the top-level webcolors module; attempting to import from submodules is not supported.
Now packaging declaratively via pyproject.toml with PEP 517 support from setuptools.
Supported Python versions are now 3.7, 3.8, 3.9, and 3.10.
Released May 2022
Supported Python versions are now 3.7, 3.8, 3.9, and 3.10.
Corrected an error regarding supported Python versions in the README file.
Released February 2020
Corrected an error regarding supported Python versions in the README file.
Python 2 has reached the end of its support cycle from the Python core team; accordingly, Python 2 support is dropped. Supported Python versions are n
Released February 2020
Python 2 has reached the end of its support cycle from the Python core team; accordingly, Python 2 support is dropped. Supported Python versions are now 3.5, 3.6, 3.7, and 3.8.
Similar to the change in version 1.9 which normalized conversions to named colors for gray/grey to always use the gray variant, the other named grays
Released September 2019
Similar to the change in version 1.9 which normalized conversions to named colors for gray/grey to always use the gray variant, the other named grays of CSS3 now normalize to the gray spelling. This affects the following colors: darkgray/darkgrey, darkslategray/darkslategrey, dimgray/dimgrey, lightgray/lightgrey, lightslategray/lightslategrey, slategray/slategrey.
The __version__ attribute of the installed webcolors module, although not documented or referenced anywhere, was accidentally not updated in the 1.9 r
Released June 2019
The __version__ attribute of the installed webcolors module, although not documented or referenced anywhere, was accidentally not updated in the 1.9 release. It has now been updated (and now indicates 1.9.1).
Added a set of constants to use when referring to specifications that define color names .
Released June 2019
Added a set of constants to use when referring to specifications that define color names.
When asked to provide a color name, using the CSS3/SVG set of names, for the hexadecimal value #808080, the integer triplet rgb(128, 128, 128), or the percentage triplet rgb(50%, 50%, 50%), webcolors now always returns u'gray', never u'grey'. Previously, the behavior could be inconsistent as it depended on the Python version in use; u'gray' was picked because it was the spelling variant used in HTML 4, CSS1, and CSS2.
The 1.8.1 release is a repackaging of 1.8 to produce both source (.tar.gz) and binary (.whl) package formats, following reports that the source-packag
Released February 2018
The 1.8.1 release is a repackaging of 1.8 to produce both source (.tar.gz) and binary (.whl) package formats, following reports that the source-package-only release of 1.8 was causing installation issues for some users. See issue 6 in the repository for details.
Added the ~webcolors.IntegerRGB, ~webcolors.PercentRGB, and ~webcolors.HTML5SimpleColor named tuples.
Released February 2018
Added the ~webcolors.IntegerRGB, ~webcolors.PercentRGB, and ~webcolors.HTML5SimpleColor named tuples.
Drop support for Python 3.3 (Python core team no longer maintains 3.3).
Mark support for Python 3.6.
The full verification tests now run correctly on Python 3.
Drop support for Python 2.6 (Python core team no longer maintains 2.6).
Released November 2016
Drop support for Python 2.6 (Python core team no longer maintains 2.6).
Mark support for Python 3.4.
On Python 3, the use of str for all functions which take string arguments is now mandatory. Attempted use of bytes will raise an exception. On Python 2, use of bytestrings is still permitted.
Python 3 support: webcolors now supports Python 3.3.
Released March 2015
Python 3 support: webcolors now supports Python 3.3.
Added HTML5 color algorithms.
Integer and percentage rgb() triplets now normalized in accordance with CSS clipping rules.
Released February 2012
Integer and percentage rgb() triplets now normalized in accordance with CSS clipping rules.
Preparatory work for Python 3 support.
Documentation now maintained using Sphinx _.
Released October 2009
Documentation expanded.
Documentation now maintained using Sphinx.
* Documentation expanded.
Documentation expanded.
Corrected the download URL in the setup.py script.
Released March 2009
Corrected the download URL in the setup.py script.
Released December 2008 * Documentation expanded.
Released December 2008
Documentation expanded.
Initial stable release of webcolors.
Released October 2008
Initial stable release of webcolors.
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →