3 ms·
A few years ago I created a Chrome extension (https://chrome.google.com/webstore/detail/palette-creator/oolpphfmdmjbojolagcbgdemojhcnlod https://chrome.google.c
by unindented 9y ago
A few years ago I created a Chrome extension (https://chrome.google.com/webstore/detail/palette-creator/oolpphfmdmjbojolagcbgdemojhcnlod https://chrome.google.com/webstore/detail/palette-creator/oo...) to do exactly this. You right-click on an image, select Palette Creator, and you get a palette with the number of colors you requested. I recently ported it to Firefox (https://addons.mozilla.org/en-US/firefox/addon/palette-creator/ https://addons.mozilla.org/en-US/firefox/addon/palette-creat...) and Opera (https://addons.opera.com/en/extensions/details/palette-creator/ https://addons.opera.com/en/extensions/details/palette-creat...) too.
It clusters the colors using Kohonen neural networks (which always makes me giggle, because "Kohonen" sounds like a Spanish swear word). The source for it all is here: https://github.com/unindented/palette-creator https://github.com/unindented/palette-creator
Unrelated: Every week I receive an offer to "monetize" my extension from the shadiest companies all over the world. I'm guessing they'd add all kinds of tracking to it, make it inject ads and fake results into the pages the user is viewing, etc. So yeah, be careful who you trust when it comes to browser extensions!
- mcjiggerlog 9y agoCool extension. Is the palette extraction available as a standalone package?
- unindented 9y agoYup, I published it as an npm module: https://www.npmjs.com/package/neuquant-js https://www.npmjs.com/package/neuquant-js
- ioi0 9y agoRight now I am using the RgbQuant library (https://www.npmjs.com/package/rgbquant https://www.npmjs.com/package/rgbquant), but I've been experimenting with neuqant-js as well. The Chrome extension you've mentioned before is really great!