Colorium Documentation

Welcome to Colorium — the ultimate color toolkit for Python developers. Whether you're building design tools, data visualizations, or just need to work with colors programmatically, Colorium provides everything you need in a clean, intuitive API.

What is Colorium?

Colorium is a modern Python library designed for developers who need precise control over color manipulation. Built with a focus on simplicity and power, it transforms complex color operations into straightforward, readable code.

Core Philosophy

Simplicity without compromise. Colorium handles the complexity so you can focus on what matters — your application. Every feature is designed to be intuitive, well-documented, and accessible to developers of all skill levels.

Key Highlights

  • 10+ Color Spaces — Work seamlessly across RGB, HSL, HWB, CMYK, OKLCH, LAB, LCH, and Display P3. Convert between any space with a single method call.

  • Rich Filter System — Apply professional-grade filters including sepia, grayscale, invert, contrast adjustment, brightness control, and saturation manipulation. Chain filters together for complex effects.

  • Perceptual Color Distance — Calculate accurate color differences using CIE76, CIE94, or the industry-standard CIEDE2000 algorithm. Determine color similarity with human-perception-based scoring.

  • 147 Named Colors — Access all CSS named colors with case-insensitive lookup. Never memorize hex codes again.

  • CSS Color Level 4 Support — Stay ahead with modern color specifications including OKLCH, LAB, LCH, and Display P3 wide gamut support.

  • Zero External Dependencies — Pure Python implementation. No third-party libraries required. Install and run instantly.

  • Production Ready — Comprehensive test coverage, type hints, and battle-tested algorithms ensure reliability.

Why Colorium?

ChallengeSolution
Working with multiple color spacesUnified Color class with automatic conversion between 10+ spaces
Complex color calculationsSimple methods like .delta_e() and .similarity() for perceptual comparisons
Finding the right filter10+ built-in filters with easy composition
Remembering hex codes147 named colors with case-insensitive lookup
External dependenciesPure Python — zero dependencies
Modern color standardsCSS Color Level 4 support (OKLCH, LAB, LCH, P3)

Quick Start

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from colorium import Color, from_string, RED, BLUE

# Create colors from any format
red = Color(255, 0, 0)
blue = from_string("blue")
crimson = from_string("crimson")

# Convert between color spaces
print(red.to_hsl_string())   # hsl(0, 100%, 50%)
print(red.to_hex_string())   # #FF0000
print(red.to_cmyk_string())  # cmyk(0%, 100%, 100%, 0%)

# Manipulate colors
red.lighter(0.3)             # Make brighter
red.darker(0.2)              # Make darker
red.saturate(0.5)            # Increase saturation

# Compare colors
distance = RED.delta_e(BLUE, "cie2000")
similarity = RED.similarity(BLUE)

# Blend colors
purple = RED.blend(BLUE, 0.5)

Documentation Sections

SectionDescription
Getting StartedInstallation, quick start, and usage examples
Core ConceptsColor spaces, creation, manipulation, and conversion
FeaturesFilters, blending, distance, similarity, and named colors
AdvancedCustom color spaces, performance, integration, and contributing
API ReferenceComplete API documentation for all classes and functions
ChangelogVersion history and release notes

Who Is Colorium For?

  • Python Developers — Anyone building applications that need color handling
  • Data Scientists — Visualizing data with accurate color representation
  • Designers — Prototyping color palettes and schemes
  • UI/UX Engineers — Building design systems and theming engines
  • Researchers — Working with color perception and analysis

License

Colorium is open source software released under the MIT License. Use it freely in personal, commercial, and enterprise projects.

Version

Version: v1.0.0

On this page
9 sections