GraphicsMagick / ImageMagick replace all non-transparent pixels (like Photoshop's color overlay)


I'm trying to replace all non-transparent pixels to a given color using GraphicsMagick for Node.

Using a composite image is not an option, I simply need to change every non-transparent pixel to a given color.

Original image:


Transparent pixels should stay transparent. I'm trying to achieve Photoshop's Color Overlay effect:

This is a bit simpler. In ImageMagick do the following:

convert 84xHk.png -fill "#E91FCB" +opaque none result.png