image-palette-finder

1.0.1 • Public • Published

image-palette-finder - A short algorithm to find the most prominent color in pictures

Ripped from colorfinder ❤️ @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 🐦 bower install image-palette-finder

Install with npm npm install image-palette-finder

MIT license

classie is released under the MIT license.

Package Sidebar

Install

npm i image-palette-finder

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mihnsen