Comparison of d3 colour interpolators with colorbrewer sequential single hue scales

ColorBrewer is a fantastic resource for great colour schemes. However, its schemes contain up to a maximum of 9 colours. Sometimes, one would like to have a similar looking scheme available for continuous data.

I wanted to see which of d3's interpolators yielded linear scales that were visually closest to the ColorBrewer ones. For all of the single hue sequential scales, the HSL interpolator seems to be visually closest. The perceptually more responsible interpolators, namely HCL and L*a*b*, yield results that are visually less similar.

(Yes, of course you could just use d3.scale.quantize if you wanted your linear domain to map to the colorbrewer colours, but I wanted to see a linear range as well.)

Comment on the blog post, see my other bl.ocks or link up with @cpbotha on twitter.