Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 649 Bytes

README.md

File metadata and controls

34 lines (27 loc) · 649 Bytes

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