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@...155...> wrote:
On Fri, Apr 25, 2008 at 12:12 PM, Hystrix <ego@...2477...> 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:
Create any object (rectangle, circle, etc.)
Hit Ctrl-Shift-F to bring up the Fill and Stroke Dialog.
Select the RGB tab and enter in your RGB colour component values.
Then select the HSL tab and it should show you the HS&L values for the
same colour.
RQ
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.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao... _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user