Direction, and color

Mike Bonner bonnmike at gmail.com
Mon Dec 15 23:07:22 EST 2014


Ah k. This method gets rid of any and all tri-color blends, simplifying
things, at which point it becomes easy.
Another method to do the same thing (or maybe the same method, but in a way
I have a chance of understanding) is to determine if an angle falls between
say, red and green, find the ratio of the distances to each, and use that
as a factor of 255 to create the color. So if red is 90, green is 210, and
the angle is 150, (the midway point) the red factor would be .5, green
would be .5, so we'd end up with 127,127,0

An angle of 110 would be 42,212,0 (the green factor being .833333, the red
factor being .166667)  Easy then to do as Richmond said, and make a lookup
table since its simply 2 inverse linear values anyway.

Eliminating the 3rd color as part of the blend makes it SO much easier.

Going to stare at your code and research till I actually understand it.  At
which point I will change it in silly and idiotic ways to see what happens.

On Mon, Dec 15, 2014 at 8:17 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>
> Thank you SO much.  Will start at it for a few days to see if I can wrap
> my noggin around it.
>
> On Mon, Dec 15, 2014 at 8:12 PM, Colin Holgate <coiin at verizon.net> wrote:
>>
>> Figured out the reason blue and green were reverse, I should have done a
>> subtraction not an addition. I replaced the stack.
>>
>>
>>
>> _______________________________________________
>> 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