Show HN: Spectra – Python color scales made easy
github.com
github.com
What does this add to colormath and grapefruit?
Spectra uses grapefruit for parsing HTML names and hexcodes.
I also like seeing nbviewer used for documentation, I haven't seen that very often.
Yes, that's definitely the type of use-case I had in mind. Another big one: Choropleth maps.
> I also like seeing nbviewer used for documentation, I haven't seen that very often.
Glad to hear it! It's my first attempt at writing documentation in an IPython notebook. Seemed like a good fit for something so visual.
> Is the rgb space actually sRGB?
Yes. Added: https://github.com/jsvine/spectra/commit/7f1ac6f5287340ed356...
> And what is the parameter to brighten/darken/saturate/desaturate?
The parameter for brighten/darken is a positive/negative linear adjustment to the L(ightness) value of the color's Lab representation. (Spectra converts the color to Lab, makes the change, and then converts back to the original color space.)
Likewise, the parameter for saturate/desaturate is a positive/negative linear adjustment to the c(hroma) value of the color's Lch representation.
Added a note here: https://github.com/jsvine/spectra/commit/fd3cbde9338ce388849...
The goal is to, ultimately, have all these details in the docstrings: https://github.com/jsvine/spectra/issues/1
[0]: http://python-colormath.readthedocs.org/en/latest/conversion...