What does HackerNews think of chroma.js?
JavaScript library for all kinds of color manipulations
I’d expect such a library to be way smaller (I dunno, but less than 10KB/4KB), and preferably support tree-shaking so that I can just pick out the hcl() function, for example, if that’s all I want.
Since HSV is NOT perceived as evenly distributed to the human eye along the value(lightness) axis[1],
would recommend employing chroma.js[2] which uses the HCL and CIE color spaces, which in general yield more pleasing results for use in color scales.
[1] http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/
[2] https://github.com/gka/chroma.js
i want hue might be a bit of overkill though: http://tools.medialab.sciences-po.fr/iwanthue/index.php
http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/
https://github.com/gka/chroma.js
The HCL color space is also available in this d3 module: https://github.com/d3/d3-plugins/tree/master/cie