colorcube.js is a domonant color extractor that runs in the browser. It’s small and easy to understand. It uses ES6 features that don’t work in Safari without a polyfill, but otherwise has no dependencies.
colorcube.js is a port of ColorCube by Ole Krause-Sparmann.