lokesh / color-thief

Grab the color palette from an image using just Javascript. Works in the browser and in Node.
https://lokeshdhakar.com/projects/color-thief/
MIT License
12.67k stars 1.31k forks source link

Code duplication between color-thief-node.js and core.js #193

Open coffee-converter opened 4 years ago

coffee-converter commented 4 years ago

It would be great to set this up so that the core.js code was actually core to both the browser and nodejs libraries. Instead, right now createPixelArray() and validateOptions() are both implemented twice identically.