image-palette-finder
v1.0.1
Published
A short algorithm to find the most prominent color in pictures
Downloads
8
Maintainers
Readme
image-palette-finder - A short algorithm to find the most prominent color in pictures
Ripped from colorfinder :heart: @pieroxy
A short algorithm to find the most prominent color in pictures
Usage
Basic
new ColorFinder();
Advanced
var colorfinder = new ColorFinder( function favorHue(r,g,b) {
return (Math.abs(r-g)*Math.abs(r-g) + Math.abs(r-b)*Math.abs(r-b) + Math.abs(g-b)*Math.abs(g-b))/65535*50+1;
} );
Methods
getImageData()
Return the image data
getMostProminentColor()
get the most prominent color
Package management
Install with Bower :bird: bower install image-palette-finder
Install with npm npm install image-palette-finder
MIT license
classie is released under the MIT license.