The above gradients compare interpolation in RGB, HSL, CIE Lab and CIE LCh color spaces. For more on color spaces, see Gregor Aisch’s post, How To Avoid Equidistant HSV Colors.
This example is built with D3. Code and documentation are available as the d3.cie plugin.
Modified http://d3js.org/d3.v2.min.js?2.9.5 to a secure url
https://d3js.org/d3.v2.min.js?2.9.5