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.

On 4/25/08, Richard Querin <rfquerin@gmail.com> wrote:

On Fri, Apr 25, 2008 at 12:12 PM, Hystrix <ego@hystrix.com.ar> wrote:
Hi, I need to convert an RGB color to HLS. Can somebody please help me find the code where Inkscape makes this conversion?
Thanks in advance.

I'm not sure if this is exactly what you're looking for, but you can do the following:

1. Create any object (rectangle, circle, etc.)

2. Hit Ctrl-Shift-F to bring up the Fill and Stroke Dialog.

3. Select the RGB tab and enter in your RGB colour component values.

4. Then select the HSL tab and it should show you the HS&L values for the same colour.


This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
Inkscape-user mailing list