News for hackers. Stuff that matters.
Re:Show HN: Get colour palettes from pictures by unindented on Thursday April 27, 2017 @10:23AM (#14211644)
A few years ago I created a Chrome extension (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-creat...) and Opera (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

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!

Re:Show HN: Get colour palettes from pictures by mcjiggerlog on Thursday April 27, 2017 @10:33AM (#14211723)
Cool extension. Is the palette extraction available as a standalone package?
Re:Show HN: Get colour palettes from pictures by unindented on Thursday April 27, 2017 @10:39AM (#14211786)
Yup, I published it as an npm module: https://www.npmjs.com/package/neuquant-js
Re:Show HN: Get colour palettes from pictures by ioi0 on Friday April 28, 2017 @10:56AM (#14219855)
Right now I am using the RgbQuant library (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!