Given an image, extracts the color palette.
Given an image, extracts the color palette using the median-cut algorithm.

Screenshot: Viktor's Juric taken from unsplash

Takes as an argument an image object and returns an array of 8 RGB colors in the form of [[r, g, b], [r, g, b] .....]
``
let imgToPalette = require('img-to-palette')
let rgbArray = imgToPalette(image)
console.log(rgbArray) // [[14, 7, 27], [34, 17, 31] ....]
console.log(rgbArray.length) // 8
``
MIT