get the dominant color of an image via javascript buy using HTML5 canvas tag
A Pen by Danail Hadjiatanasov on CodePen.
//events - a super-basic Javascript (publish subscribe) pattern | |
var events = { | |
events: {}, | |
on: function (eventName, fn) { | |
this.events[eventName] = this.events[eventName] || []; | |
this.events[eventName].push(fn); | |
}, | |
off: function(eventName, fn) { | |
if (this.events[eventName]) { |
get the dominant color of an image via javascript buy using HTML5 canvas tag
A Pen by Danail Hadjiatanasov on CodePen.