colour
converts and manipulates various color representation (HSL, RVB, web, X11, ...)
What it is and what it does
Colour is a lightweight library for working with colors in Python. It provides a single Color object that can be instantiated from multiple formats—named colors (e.g., 'red'), RGB tuples, HSL tuples, 3-digit hex, or 6-digit hex—and converts freely between them. You can read and modify individual color components (red, green, blue, hue, saturation, luminance) and generate smooth color gradients between two colors. The library also includes standalone conversion functions (rgb2hex, hsl2rgb, etc.) for those who prefer functional style.
The package has no runtime dependencies, making it trivial to install. However, it has been abandoned since 2017 and receives no active maintenance. The codebase is documented with extensive doctest examples, and the library is designed to be simple and Pythonic. It's suitable for small projects, scripts, and educational use, but should be carefully evaluated for production systems that need ongoing support or compatibility with the latest Python versions.
Use it for:
- Generate color scales or gradients for data visualization, heatmaps, or UI design mockups.
- Parse and normalize user-supplied color input (hex, RGB, named colors) in web applications or CLI tools.
- Convert between color formats in image processing or graphics pipelines that need both human-readable and machine-readable representations.
- Build simple color-picking or color-identification features in applications.
- Create CSS or HTML color specifications programmatically from RGB or HSL values.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts between and manipulates color representations including RGB, HSL, hex (3- and 6-digit), and named web colors, with support for color gradients and comparison.
Yes, if you need simple color conversion and manipulation in a small script or educational project and are comfortable with an unmaintained package. No, if you require active maintenance, support for modern Python versions, or a production-grade library—consider a maintained alternative. The zero dependencies and permissive license make it low-risk to try, but the 2017 last release and abandoned status mean no bug fixes or feature updates will arrive.
Install
colour on PyPI
pip
pip install colouruv
uv add colourpoetry
poetry add colourInstalling colour
Before you install
No runtime dependencies and low install friction. However, the package is abandoned—last release was 2017-11-19 and last commit 2023-07-30—so expect no active maintenance or support for modern Python versions.
License in practice
BSD 3-Clause License (permissive) allows use in most projects, commercial or open-source, with minimal restrictions beyond attribution.
Quickstart
pip install colour
from colour import Color
c = Color("red")
print(c.hex) # '#f00'
print(c.rgb) # (1.0, 0.0, 0.0)
red = Color("red")
blue = Color("blue")
for color in red.range_to(blue, 5):
print(color)
Package is abandoned; classifiers list Python 2.7, 3.3–3.6 but no requires_python constraint, so compatibility with modern Python versions is unverified.
Verify before relying
- Whether the package actually works on Python 3.7 and later despite being last released in 2017.
- Whether the web color naming follows current W3C standards or is frozen at the time of last release.
- Performance characteristics when generating large color gradients.
Package facts
| License | BSD 3-Clause License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,190 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,026,948/month — #3,355 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: colour-0.1.5-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
coloraideColorAide is a pure Python library for…
permissive · top 15,000 on PyPI
colorhashGenerates deterministic colors from any object…
permissive · top 15,000 on PyPI
colorloverProvides a library of human-friendly color…
unclear · top 15,000 on PyPI
colorzerocolorzero provides a simple, immutable color…
permissive · top 15,000 on PyPI
colourmapGenerates unique RGB and HEX colors from input…
permissive · top 15,000 on PyPI
webcolorsConverts and normalizes HTML and CSS color…
permissive · top 1,000 on PyPI
color-operationsApplies color-oriented image operations—gamma…
permissive · top 15,000 on PyPI
colour-scienceColour provides algorithms and datasets for…
permissive · top 15,000 on PyPI
materialyoucolorGenerates Material Design 3 color schemes and…
unclear · top 15,000 on PyPI
color-matchercolor-matcher transfers color characteristics…
copyleft · top 15,000 on PyPI