chroma.js

Chroma.js is a JavaScript library for working with colors in visualizations. In contrast to many similar libraries it supports advanced color models like CIE Lab and Hue-Chroma-Lightness which are helpful to overcome the traps of equidis­tant HSV col­ors (for why you may care, see https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/ and http://en.wikipedia.org/wiki/Labcolorspace ). Also it includes support for color scales and the beautiful palettes by Cynthia Brewer.