Spectra is a Python library that makes color math, color scales, and color-space conversion easy. Support for:
- Color scales (linear, non-linear, and polylinear)
- Color ranges
- Color blending
- Brightening/darkening colors
- Saturating/desaturating colors
- Conversion to/from multiple color spaces:
Spectra is built on colormath and grapefruit. Spectra is enormously inspired by chroma.js and d3's scales.
pip install spectra
See documentation here.
Issues and pull requests very much appreciated.