January 17, 2006
Flash 8: How to Colorize Àla Photoshop

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:




Download the sourcecode here.

Posted at January 17, 2006 02:15 PM | Further reading
Comments

Great solution! Thanks

Posted by: Nikita on January 17, 2006 11:00 PM

i feel myself dumb as a brick. such easy and beautiful solution!

thank you, oh thank you!

Posted by: tako on February 15, 2006 02:08 PM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?



Site Search

Google
quasimondo.com
incubator.quasimondo.com
lectures.quasimondo.com
Most Visited Entries
Experiments
Lectures
Contact
Backlog
In Love with
Powered by