Re: Scripting gradients

2012-09-05 Thread John Allijn
It works! :) On Sep 5, 2012, at 12:17, Guglielmo Braguglia wrote: > John ... your values are already *RGB* values, just differently written ... > ;-) > > E.g. ... *#FF7F00* is made by three couples of values : FF (/the R value/) > 7F (/the G value/) 00 (/the B value/) just written in hexad

Re: Scripting gradients

2012-09-05 Thread Guglielmo Braguglia
John ... your values are already *RGB* values, just differently written ... ;-) E.g. ... *#FF7F00* is made by three couples of values : FF (/the R value/) 7F (/the G value/) 00 (/the B value/) just written in hexadecimal ... convert to the decimal value and ... that's all. So #FF7F00 is j

Re: Scripting gradients

2012-09-05 Thread John Allijn
I think i can get it working, but i'm strugling with the color-coding. My colors are all in a hex format like #FF. How do I convert that to RGB values? I can't find a command for this in the help. On Sep 5, 2012, at 11:00, Scott Rossi wrote: > Sorry, make that: > > put theArray["ramp"

Re: Scripting gradients

2012-09-05 Thread John Allijn
Thanks! On Sep 5, 2012, at 11:00, Scott Rossi wrote: > Sorry, make that: > > put theArray["ramp"] into theVar (no object reference needed) > > > Recently, I wrote: > >> Gradient settings are stored in an array property called the fillGradient. >> The color data is stored the "ramp" index

Re: Scripting gradients

2012-09-05 Thread Scott Rossi
Sorry, make that: put theArray["ramp"] into theVar (no object reference needed) Recently, I wrote: > Gradient settings are stored in an array property called the fillGradient. > The color data is stored the "ramp" index. So to get the colors, you could > script something like: > put the fill

Re: Scripting gradients

2012-09-05 Thread Scott Rossi
Gradient settings are stored in an array property called the fillGradient. The color data is stored the "ramp" index. So to get the colors, you could script something like: put the fillGradient of graphic "myBox" into theArray put theArray["ramp"] of graphic "myBox" into theVar The variable theVa

Scripting gradients

2012-09-05 Thread John Allijn
Hi, I have a rectangle that I filled with a gradient in the inspector. Is there a way to script the colors of this gradient? I want to let the user pick a color for a color theme and have the gradient match that. Thanks! ___ use-livecode mailing list