Socket
Socket
Sign inDemoInstall

image-palette-finder

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

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


Version published
Maintainers
1
Created

Readme

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

FAQs

Last updated on 29 Mar 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc