Chroma.js – A JavaScript library for color conversions and color scales (github.com) 66 points by hising 11y ago ↗ HN
[–] stevengapo 11y ago ↗ Awesome, I've been looking for something exactly like thisI've just implemented it to set the text colour on http://www.stevengapo.com (which gets its colour scheme from random instagram photos) and it's much more readable now
[–] xemoka 11y ago ↗ 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: https://vis4.net/blog/posts/mastering-multi-hued-color-scale... [–] leeoniya 11y ago ↗ couple additional links/libs for human-friendly color models:http://www.boronine.com/husl/http://alienryderflex.com/hsp.html
[–] leeoniya 11y ago ↗ couple additional links/libs for human-friendly color models:http://www.boronine.com/husl/http://alienryderflex.com/hsp.html
[–] leeoniya 11y ago ↗ shameless plug, if you need to do color reduction for images:play: http://o-0.me/RgbQuant/code: https://github.com/leeoniya/RgbQuant.js
[–] prabhasp 11y ago ↗ The blog posts from Chroma.js https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/ https://vis4.net/blog/posts/mastering-multi-hued-color-scale... are really nice, and help you figure out how to use Chroma.js (and the LAB color scheme). Nice work!
6 comments
[ 4.1 ms ] story [ 29.1 ms ] threadI've just implemented it to set the text colour on http://www.stevengapo.com (which gets its colour scheme from random instagram photos) and it's much more readable now
http://www.boronine.com/husl/
http://alienryderflex.com/hsp.html
play: http://o-0.me/RgbQuant/
code: https://github.com/leeoniya/RgbQuant.js