Get my ColorTween class at www.mediaverk.lv/asd/com/jR/Math/ColorTween.as
Then do the simple thing:
import com.jR.Math.ColorTween;
var midColor:Number = new ColorTween([0xFF0000, 0x0000FF]).getPoint(255/2);
trace("0x"+midColor.toString(16))2006/3/10, Joakim Carlgren <[EMAIL PROTECTED]>: > > Whats the easiest way to calculate the average of two colors? > > > > > > var color1:Number = 0xFF0000 > > var color2:Number = 0x0000FF > > > > var myColor:Color = new Color(my_mc) > > myColor.setRGB((color1 + color2) / 2) > > I know its not this simple and probably I need to play with bitwise > operators.. > > Any easy way to solve this? > > > > Joakim Carlgren > > > > > > _______________________________________________ > [email protected] > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

