We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Implement HLS? (Read 1361 times)
Implement HLS?
Mar 9th, 2009, 10:04pm
 
Would it be an idea to implement the colour system HLS? It's the one that is used in the windows colour picker rather than HSB. HLS makes more sense to me than HSB. There is Java code for converting between RGB and HLS here:
http://www.imagingbook.com/index.php?id=98
Re: Implement HLS?
Reply #1 - Mar 9th, 2009, 10:45pm
 
Well, Processing is an open source project, so why don't you do it and submit the patch?

It shouldn't be that hard.  My guess is that under-the-covers, Processing implements HSB in some way that transparently maps everything to RGB.  You'll just need to implement an HLS-to-RGB function, hook it in to the right places, and define another enum value so people can use it.
Re: Implement HLS?
Reply #2 - Mar 9th, 2009, 11:10pm
 
Yes, I'll look into doing it once I've finished this project hand-in in 2 weeks time. A colour library would be useful for things like colour schemes and complements etc.
Re: Implement HLS?
Reply #3 - Mar 10th, 2009, 1:57am
 
markh wrote on Mar 9th, 2009, 11:10pm:
Yes, I'll look into doing it once I've finished this project hand-in in 2 weeks time. A colour library would be useful for things like colour schemes and complements etc.


I don't think it supports HLS but otherwise there are some quite neat colour-related functionalities in colorlib ( http://code.google.com/p/colorlib/ ).
Page Index Toggle Pages: 1