Is there a way to find a lighter and darker shade of a RGB color programmatically?

Paul Hibbert lc at pbh.on-rev.com
Wed Feb 15 07:53:37 EST 2012


Hey Keith,

One site that could help you is Scott Rossi's tactilemedia.com he has some great tutorials and the 'Color Slider' tutorial should give you all the info you need to convert your colour data into HSB (HSL), then you can just compare the brightness values and respond accordingly.

The tutorial page is here; http://www.tactilemedia.com/site_files/software/tutorials.html

Paul

On 15 Feb 2012, at 11:15, Keith (Gulf Breeze Ortho Lab) wrote:

> Hi All,
> 
> I have a problem... If a user selects a color and I put it into a variable (as RGB), how can I find a shade that is several shades lighter, and a shade that is several shades darker, also in RGB format?
> 
> For example, I put 0,255,64 into myVar. (This color a shade of green.) Programmatically, how can I find a shade that is several shades lighter in green and a shade that is several shades darker in green from this base color?
> 
> (By the way... Is there a way in LiveCode to determine the hue of a color and change the value?)
> 
> Any help would be most appreciated...
> 
> Thanks!
> 
> - Boo
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list