Forums > MaxMSP

RGB to HSL and back

January 12, 2006 | 10:08 pm

I’m looking for a simple external which converts an rgb value to hsl and
back just like the jitter objects, but for one value instead of a matrix. If
it doesn’t exist I’ll write one myself, but I have a feeling its out there
somewhere…

Thijs


January 12, 2006 | 11:01 pm

hsv2rgb – color space conversion (circular swatch)

http://www.maxobjects.com could have told you,
it lists 5 options out of which mine is the only one ported to windows.

http://www.jasch.ch/dl

/*j


January 12, 2006 | 11:25 pm

thanks Jasch,

I think I better get some sleep. I already checked hsv2rgb, because I use
your library pretty often, but somehow my mind returned "hsv != hsl" doh!

best, t_


January 13, 2006 | 1:07 am

but you’re mind is right: hsv and hsl are NOT the same, or am I getting
completely confused here ?

if char is ok the easy way to do all kinds of conversions is to fill a
matrix of one value, use jit.colorspace and use [jit.iter] to get your
output…

ciao,

Joost.

——————————————-

Joost Rekveld
———– http://www.lumen.nu/rekveld

——————————————-

"The mystery of the world is the visible, not the invisible"
(Oscar Wilde)

——————————————-


January 14, 2006 | 5:03 pm

Ah all this color stuff is new to me… I was just now getting confused by
the fact that I can’t use the hsv "v" value to go from black to white, like
you can with hsl, which is what I’m looking for. That explains it. I’ll try
your solution. Thanks.

Thijs


Viewing 5 posts - 1 through 5 (of 5 total)