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.
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:
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.
RQ
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
hi richard~ i'm sorry to tell you you've asked the wrong person. i just signed up an hr ago, & didn't get as far as sending an email to ask how i get started & to the place to do artwork. i've used computer cad programs (only 2) for techinical illustrations on how to put the garment together. for work as a patternmaker in the garment industry, & "Paint" for designing jewelry, & misc. other item for mass production, & limited graphics...so i'm trying to learn this....so if you feel like being the brilliant one....sometime when you have the time...."how the heck do i start on inkscape..." sorry & thanks & good luck on getting your questions answed. sincerely~artsygirl
Date: Fri, 25 Apr 2008 17:48:40 -0300From: ego@...2508...: inkscape-user@...2149....2509...: Re: [Inkscape-user] RGB to HLSI'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: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.RQ-------------------------------------------------------------------------This SF.net email is sponsored by the 2008 JavaOne(SM) ConferenceDon'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... mailing listInkscape-user@...2510...://lists.sourceforge.net/lists/listinfo/inkscape-user-- Hystrix _________________________________________________________________ Back to work after baby–how do you know when you’re ready? http://lifestyle.msn.com/familyandparenting/articleNW.aspx?cp-documentid=579...
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
On 4/25/08, Aaron Spike <aaron@...476...> wrote:
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
Thanks Aaron, that's even better than what I was asking for.
I should have looked for something like that in Python docs.
On Apr 25, 2008, at 2:54 PM, Hystrix wrote:
Thanks Aaron, that's even better than what I was asking for. I should have looked for something like that in Python docs.
Please just be careful about using HLS, it is generally taken to be a poor choice for most needs.
http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC36
Some other spaces are organized to be perceptually uniform, so I'd look at what else that lib might give you
participants (5)
-
Aaron Spike
-
Hystrix
-
Jon A. Cruz
-
michelle tiner
-
Richard Querin