NFL.com Fantasy Football 2013
A Meandering Path to an Evolvi…Quick as a FlashThings Every ActionScript Deve…Making Money with Adobe AIRUsing Flash for 3D Game MMO UIUtilizing Flash for Game UI De…Why I (Still) Love FlashMy Favourite Things
Posted on September 15, 2005 by
The new ColorMatrixFilter in Flash 8 provides enhanced color manipulation capabilities to developers. If you’ve played around with it, you’ve noticed that the ColorMatrixFilter accepts a 5×4 matrix (20 element Array in Flash) and uses specific indices in that array as multiplication values for Red, Green, Blue and Alpha, as well as offset values (we are currently writing an article explaining different types of matrices in depth, including the ColorMatrix, which you should see at Macromedia’s Developer Center in the near future). The ColorMatrix class was born a while back out of the need to have a more “friendly” programmatic interface to manipulating these color values.
ColorMatrix provides a way to adjust Brightness, Contrast, Saturation and Hue based on a range of numeric values as well as multiply matrices. The ColorMatrix can then be passed into ColorMatrixFilter to apply color adjustments. The added bonus of ColorMatrix is that it uses the same calculations to generate matrix values as the Flash 8 IDE (with the exception of contrast adjustment which uses linear interpolation to provide a bit more granularity).
You can download the source here.
In writing this entry, I also noticed that the ever wise Quasimondo has written his own ColorMatrix class. Cheers
Follow @gskinner on Twitter for more news and views on interactive media.