Flash 8: ColorMatrix
Today I’ve got something not very spectacular but nevertheless quite useful: a demo of my ColorMatrix class. The new ColorMatrixFilter is a very versatile tool that allows for many color manipulations, many more than the good old ColorTransform was capable of. The only problem with the filter is that in order to use it you will have to feed it with a ColorMatrix which in pratice is an array of 20 elements. Not really the most intuitive way, but that’s the price for its flexibility.
Fortunately there’s lots of documentation all over the web on how those ColorMatrices work and what numbers you have to put where in order to achieve a certain effect like adjusting the contrast, creating a greyscale version or roating the hue of an image. The ColorMatrix class takes care for all the matrix operations that are necessary to achieve those effects. I will publish the sourcecode as soon as Flash 8 is officially released. For the moment here’s a little demo of some of its possibilities:




