canvas-colorize-alpha

colorize-alpha for canvas

npm install canvas-colorize-alpha
2 downloads in the last week
4 downloads in the last month

HTML5 Canvas colorize-alpha

api

colorizeAlpha(
    // a canvas element with things drawn on it
    canvas,
    // a list of steps, assumed to be equidistant,
    // start at 0% and end at 100%, in [r, g, b] form.
    [[255, 0, 0], [255, 255, 0], [0, 255, 0], [0, 255, 255]]);
npm loves you