|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 26.08.2014 04:30, schrieb wealthychef:
> > I want to print out the color my macro is returning somehow.
> > I've tried blah blah blah... FAIL
>
> "Returning" values from within control structures in a macro can be
> troublesome; try something like this:
>
> #macro ColorFromBurgers(burgers)
> #switch(burgers)
> #range(-5,-1)
> #local Result = rgb <141,211,199>/255.0;
> #break
> #case (0)
> #local Result = rgb <255,255,179>/255.0;
> #break
> #case (10)
> #local Result = rgb <190,186,218>/255.0;
> #break
> #end
> Result
> #end
>
>
> As for printing the result, remember that colours are vector-like
> beasts, so vstr() should do the job.
Thank you so much for the help! Cheers. That worked great.
Post a reply to this message
|
|