Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.11 KB

README.md

File metadata and controls

35 lines (25 loc) · 1.11 KB

Spectra

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:
    • rgb (specifically: sRGB)
    • hsl
    • hsv
    • lab (CIELAB)
    • lch (a.k.a. hcl)
    • cmy
    • cmyk
    • xyz

Spectra is built on colormath and grapefruit. Spectra is enormously inspired by chroma.js and d3's scales.

Installation

pip install spectra

Documentation

See documentation here.

Feedback/Suggestions

Issues and pull requests very much appreciated.