I need to create a command that mimics Adobe Photoshop’s “Color” blend mode in ImageMagick in order to tint an image. In order to do this, I’m trying to compose the original image and another image that consists of a full color layer, at 35% opacity. This should blend with the original image and create a color tinted result image.
This is the expected result:

The “Color” blend mode is being defined, on the Adobe site, like this: “Creates a result color with the luminance of the base color and the hue and saturation of the blend color. This preserves the gray levels in the image and is useful for coloring monochrome images and for tinting color images.”
There is a compose method defined into ImageMagick that seems to do the same thing (Luminize), but the results are not by far what is expected.
What seems to provide the closest result in Imagemagick is the default blend compose method, used like this:
convert image.jpg color_layer.png -compose blend -composite result.jpg
I also tried creating an image that would contain the luminosity of the first image and the hue and saturation of the second using the -fx operator, but the result was again nowhere near what I needed.
Based on Castles valuable answer, I tried to find the best solution of doing this in PHP. The implementation he cited has two major flaws: one that it doesn’t take account of the opacity, if any and the second that is very slow and resource consuming. Processing a 500×500 pixels image in PHP would take about 15 seconds in which Apache would hold the processor up to 95%.
The fastest and least resources consuming I found was actually doing it in HTML5 by using canvas to process the image. The results are amazing and the image is being processed on the spot.
I will post below the final chunks of code, one for PHP and one for HTML. If you need to use this serverside, you can copy-paste the HTML code in Node.js and NodeCanvas: https://github.com/LearnBoost/node-canvas
PHP (with opacity):
HTML: