This module calculates the average rgb value of a canvas.
> npm install avg-canvas-rgb
The only argument you need to pass in is the imageData.
var avrRGB = require('avg-canvas-rgb');
console.log( avrRGB( context ) ); // [35, 34, 95]
Had a fun reading on CanvasRenderingContext2D.getImageData() and there were not any module that does this calculation.
super light, no dependencies, written in ES5.