Scripting shades of colors?
dan at clearvisiontech.com
Tue Oct 30 11:02:21 CDT 2012
Here is a function that I use to lighten a color. You could modify this to get a darker color as well. Hope it helps.
function lightenColor origColor
repeat with i = 1 to 3
add 50 to item i of origColor
if item i of origColor > 255 then put 255 into item i of origColor
if item i of origColor < 0 then put 0 into item i of origColor
> Hi there
> Lets say I have a color a,b,c
> Now I want the same color but fx 10% darker and 10 % lighter.
> (As if you in the colorwheel palette dragged the scrollbar-thumb a little down and a little up)
> How could one script this?
More information about the use-livecode