Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

color-thief-browser

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

color-thief-browser

Get the dominant color or color palette from an image (Browser version).

    2.0.2latest
    GitHub

Version published
Maintainers
1
Weekly downloads
605
decreased by-28.66%

Weekly downloads

Readme

Source

#Color Thief

A script for grabbing the color palette from an image. Uses Javascript and the canvas tag to make it happen.

See a Demo | Read more on my blog

##How to use

###Get the dominant color from an image

var colorThief = new ColorThief(); colorThief.getColor(sourceImage); getColor(sourceImage[, quality]) returns {r: num, g: num, b: num}

###Build a color palette from an image

In this example, we build an 8 color palette.

var colorThief = new ColorThief(); colorThief.getPalette(sourceImage, 8); getPalette(sourceImage[, colorCount, quality]) returns [ [num, num, num], [num, num, num], ... ]

Changelog

v2.0.1 - 2015-10-05

  • [Fix] Remove left-over references to Creative Commons License. MIT all-around.
  • [Fix] MMCQ lib issues #16 by @nobodypb
  • [Fix] Incorrect bower.json main property path. #37 by @chellem, @joscha, @dkushner
  • [Fix] Quality less than 1 causes infinite loop #33 by @nteike
  • [Fix] MMCQ.quantize(...) can return false or undefined thus breaking the application (#55)[https://github.com/lokesh/color-thief/pull/55] by @mhahmadi
  • [Remove] Drop version number from bower.json #70 by @kkirsche

v2.0.0 - 2013-06-23

  • Embed quantize into color thief file
  • Strip out jQuery requirement
  • Credit those who helped with edits - Nathan Spady for drag and drop support.

Keywords

FAQs

Last updated on 20 Oct 2016

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • 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