25 Apr
2008
25 Apr
'08
9:13 p.m.
Hystrix wrote:
I'm trying to write a script that takes a color palette and reorders its colors in some predefined way. To do this I'd like to have the colors arranged acording to the luminance value and then to the hue value but the colors in the palette file are in RGB so first I need to calculate the HLS values. That's why I'd like to see the code Inkscape uses to change from the RGB to HLS.
When we were generating palettes we used python and the colorsys module:
http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/share/pal...
Aaron Spike