imgdye
Tint PNG images using Javascript – very useful for projects/games using HTML5 Canvas.
Install
$ npm install --save imgdye
Usage
var imgdye = // imgdye returns a buffer containing the testImage with a 70% opacity #33CC33 color overlayvar testImage = documentvar dyedTestImage = // Use the buffer to draw the tinted image on a canvasctx
Here's a simple test sample using the function: http://bluecodestudio.com/CanvasDye/test.html
License
MIT © David da Silva