Get palette for any image file, no node-canvas
npm install image-palettejavascript
var palette = require('image-palette')
var pixels = require('image-pixels')
var {ids, colors} = palette(await pixels('./image.png'))
`
API
$3
Extract palette from the input pixels array with rgba pixels sequence, whether flat or nested.
* colors is a list of extracted colors [[r, g, b, a], [r, g, b, a], ...].
* ids is an array of input pixels mapped to extracted colors.
* amount is an array with amounts corresponding to the extracted colors, from 0..1 range.
* count` is max number of colors to extract.