[reportlab-users] HSV color space conversion functions

Robin Becker reportlab-users@reportlab.com
Tue, 13 Aug 2002 19:15:17 +0100


In article <200208131630.g7DGUeci031716@ratthing-b246.strakt.com>, Laura
Creighton <lac@strakt.com> writes
>> In article <33D4A50C-AEC9-11D6-9E0F-00039345C610@darwin.in-berlin.de>,
>> Dinu Gherman <gherman@darwin.in-berlin.de> writes
>> >Bernhard Herzog:
>> >
>> >> Dinu Gherman <gherman@darwin.in-berlin.de> writes:
>> >>
>> >>> I recently wrote two simple functions to convert between RGB and
>> >>> HSV color values.
>> >>
>> >> How do they differ from the functions in Python's colorsys module?
>> >
>> >Mine have docstrings! ;-) And my range for the Hue component
>> >is [0...360] instead of [0...1]. Well, quite true, I should check
>> >the standard library more often... Thanks for pointing this out!
>> >
>> >Dinu
>> I think I prefer to have only a single definition for these things and
>> all the references I can find seem to use 0-360 for the H value in HSV &
>> HLS systems. Perhaps python's colorsys thing isn't really true HSV? 
>> -- 
>> Robin Becker
>
>Nope, Python's is just fine.  I modified Pynche to do HSV a while ago.
>Did you look at http://www.inforamp.net/%7epoynton/ColorFAQ.html?
>
>Laura Creighton
I looked at a lot of apple sites which all seem to use 0-360 eg 

        http://www.buena.com/articles/hsvspace.pdf

seems the artists use a circle and the engineers use 0-1. The printers
all seem to use 0-100% any way.
-- 
Robin Becker