
But first, for the curious, here's the actual mathematical formula Flash uses:ĭestR = ( a * srcR ) + ( a * srcG ) + ( a * srcB ) + ( a * srcA ) + a ĭestG = ( a * srcR ) + ( a * srcG ) + ( a * srcB ) + ( a * srcA ) + a ĭestB = ( a * srcR ) + ( a * srcG ) + ( a * srcB ) + ( a * srcA ) + a ĭestA = ( a * srcR ) + ( a * srcG ) + ( a * srcB ) + ( a * srcA ) + a I realize it's tricky to understand this just from reading about it, so we're going to look at some cool example effects. The Offset column lets you simply increase or decrease the amount of red, blue, or green in the destination pixel: type -255 into the R row's Offset column and you'll see that there is no longer any red in the image. The A values have much the same effect as the R G B values, but since none of these sample images are transparent, it's hard to demonstrate. Well, A stands for alpha, which means transparency. You're probably wondering about the A column and row and about the Offset column. the amount of red in the destination pixel would be equal to the amount of green in the source pixel! Furthermore, if you changed the second row to read "1 0 0", then the amount of green in the destination pixel would be equal to the amount of red in the source pixel you would have swapped them over and your orange fish would turn into green ones: There's no change! But what if we changed a to zero and a to 1? Then:ĭestR = ( 0 * srcR ) + ( 1 * srcG ) + ( 0 * srcB ) Here you can see that a is 1, while a and a are both zero, so:ĭestR = ( 1 * srcR ) + ( 0 * srcG ) + ( 0 * srcB ) The question is: how much red will be in that pixel of the destination image, destR? Flash uses this calculation:ĭestR = ( a * srcR ) + ( a * srcG ) + ( a * srcB ) Let's call the amount of red in that srcR, the amount of green srcG and the amount of blue srcB.

Now, think about just one single pixel in the entire source image (the one in the top-left corner will do).

Let's label these values a, a, and a in turn.
