Thanks Aliā€¦ I was overthinking this one for sure

this works great:

on mouseUp
   put "255,255,0" into pColor2 # bright yellow
   send "setfillGradient ,,,pColor2,,," to grc colorMeditationBkgnd
end mouseUp

command setFillGradient pStartPosition,pEndPosition,pColor1, 
        if pStartPosition is empty then put kDefaultStart into pStartPosition
        if pEndPosition is empty then put kDefaultEnd into pEndPosition
        if pColor1 is empty then put kPureWhite into pColor1
        if pColor2 is empty then put kPureBlack into pColor2
        if pAlpha1 is empty then put kDefaultOpacity into pAlpha1
        if pAlpha2 is empty then put kDefaultOpacity into pAlpha2
        put(pStartPosition & comma & pColor1 & comma & pAlpha1) into 
        put cr &(pEndPosition & comma & pColor2 & comma & pAlpha2) after 
        set the fillgradient["ramp"] of me to  tGradientRamp
end setFillGradient


On 10/17/16, 11:09 PM, "use-livecode on behalf of Ali Lloyd" 
< on behalf of> 

    Send params are evaluated in the current context, so you can put variable
    names in the list and it will work, eg:
    local tRGB
    put "25,25,25" into tRGB
    send "doSomethingWithColor tRGB" to stack "Color Manager"

use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your subscription 

Reply via email to