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.