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

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

Email Address:



Remember info?

Thank you!

Most Visited Entries
Sketches, Works & Source Code
In Love with
Powered by
Movable Type 2.661

© Copyright Mario Klingemann

Syndicate this site:
RSS 1.0 - RSS 2.0

Quasimondo @ flickr
Quasimondo @ LinkedIn
Quasimondo @ Twitter
Quasimondo @ Facebook
Quasimondo @ MySpace
Quasimondo is a Bright
Citizen of the TRansnational Republic
My other blog in german

My family name is written Klingemann,
not Klingelmann, Klingeman, Klingaman, Kingemann,
Kindermann, Killingaman, Klingman, Klingmann, Klingonman
Klingemman, Cleangerman, Klingerman or Kleangerman

profile for Quasimondo at Stack Overflow, Q&A for professional and enthusiast programmers