Socket
Book a DemoInstallSign in
Socket

image-palette-finder

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-palette-finder

A short algorithm to find the most prominent color in pictures

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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.

Keywords

colorfinder

FAQs

Package last updated on 29 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts