0.1.0 • Published 8 years ago
color-palettes v0.1.0
color-palettes
Get color from image
Install
npm install color-palettes
Usage
import colorPalettes from 'color-palettes'
let cp = new colorPalettes('pic.jpg')
cp.getPalettes({
colorCount: 6
}).then( (result) => {
console.log(result) // [ [51, 94, 123], [210, 186, 185], ...[114, 192, 174]]
})
import colorPalettes from 'color-palettes'
let cp = new colorPalettes('pic.jpg')
cp.dominantThree({
format: 'hex'
}).then( (result) => {
console.log(result) // #
})
Credits
- Basic Javascript port of the MMCQ (modified median cut quantization) from Nick Rabinowitz. (http://gist.github.com/1104622)
0.1.0
8 years ago