Description
extract-colors is a JavaScript library that pulls the most common colors out of an image and returns a color palette. It is simple, fast and lightweight. It works in the browser, where it can use Web Workers, and in Node.js, and it ships as browser, Node.js and ECMAScript module builds. The library is written in TypeScript, so its options and results are typed. The calculation uses two passes. The first pass optimizes the work to reduce time, and the second sorts the colors with more precise calculations. Every option lets you tune the calculation finely. You install it from npm, then call extractColors with an image source and handle the returned promise. The site has a demo that extracts a palette from a random Unsplash image. Browser support is listed from Firefox 29, Chrome 33, Edge 12 and Safari 8, with Node.js 6.0 and later. It is released under the MIT License. It suits designers and developers who want a palette from a picture in code.…
Highlights
- Extracts a color palette from an image
- Works in the browser and in Node.js
- Web Workers support
- Written in TypeScript
- Fine-grained calculation options
Ratings & Reviews
No ratings yet
Be the first to rate Extract Colors.
People also visit
Extract Colors FAQ
What is extract-colors?
A JavaScript library that finds the most common colors in an image and returns them as a palette.
How do I install it?
Run npm install extract-colors in your project, then import extractColors and call it with the image source.
Which environments does it support?
Browsers, including Web Workers, and Node.js. It also exports ECMAScript modules.
Is it free?
Yes. It is released under the MIT License.
What are the best Extract Colors alternatives?
Popular alternatives to Extract Colors include lokeshdhakar.com/projects/color-thief, Image Color Picker and Image Color Picker. See all Extract Colors alternatives




