Colorize like in Photoshop

So I’ve looking for a colorize effect like the one in Photoshop but the ones I find (like greensocks ColorMatrixFilterPlugin and M Klingemans ColorMatrix) doesn’t work the same way.

In Photoshop, blacks and whites are preserved, and full color is mid grey, meaning a gradient from white to black colorized by red will go from white, to full red, to black. But in the AS3 versions, white is full color, meaning the same gradient will go from full red to black. This means that a colorized photo will get much darker than the original since you loose all the white.

I’ve also seen functions doing the opposite, where black gets full color, meaning they will be brighter than the original.

Does anyone know if there exist an AS3 colorize version that works same way as the Photoshop one?