Awesome, I've been looking for something exactly like this<p>I've just implemented it to set the text colour on <a href="http://www.stevengapo.com" rel="nofollow">http://www.stevengapo.com</a> (which gets its colour scheme from random instagram photos) and it's much more readable now
The blog posts from Chroma.js
<a href="https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/" rel="nofollow">https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/</a>
<a href="https://vis4.net/blog/posts/mastering-multi-hued-color-scales/" rel="nofollow">https://vis4.net/blog/posts/mastering-multi-hued-color-scale...</a>
are really nice, and help you figure out <i>how</i> to use Chroma.js (and the LAB color scheme). Nice work!
And here's a blog post from a year ago on Chroma.js that goes into a bit of detail about why it matters and some demos: <a href="https://vis4.net/blog/posts/mastering-multi-hued-color-scales/" rel="nofollow">https://vis4.net/blog/posts/mastering-multi-hued-color-scale...</a>
shameless plug, if you need to do color reduction for images:<p>play: <a href="http://o-0.me/RgbQuant/" rel="nofollow">http://o-0.me/RgbQuant/</a><p>code: <a href="https://github.com/leeoniya/RgbQuant.js" rel="nofollow">https://github.com/leeoniya/RgbQuant.js</a>