As two commenters on my recent ColorMatrix class update correctly noticed, the new colorize() method does not tint images the way Photoshop does it. It's more the Blue Note Album Cover type of tint it does.
Of course I have tried immediately to find the right ColorMatrix values that simulate the Photoshop colorize method, but I was not able to achieve the desired effect. So unless somebody proves me wrong I dare to say that it is not possible to do it with just a single ColorMatrix operation (of course I only say that to encourage someone to prove me wrong).
Nevertheless there is a way to get the colorizing right and it is rather simple. It only involves two operations:
- first desaturate the image with the ColorMatrix.desaturate() method
- then draw a rectangle filled with the desired color over the whole image using the "overlay" blendmode.
Here's the demo:
Posted at January 17, 2006 02:15 PM | Further reading


