this works for me:
*/** @param factor is between 0 and 1 (if higher/lower, it will clip
correctly) */*
*public* *static* *function* mixColor(a:*Number*, b:*Number*, factor:*Number
*):*Number*
{
*if*(factor >= 1)
*return* a;
*if*(factor <= 0)
*return* b;
*var* fb:*Number* = 1-factor;
*return* (
Hi Jeff,
Here's a class that will generate an array for N elements that blends
between two RGB values.
Example:
import org.bespoke.color.ColorBlend;
var myBlender:ColorBlend=new ColorBlend(0xFF,0x00FF00);
//to get the RGBN value at 46% between the two...
var
2 matches
Mail list logo