This example shows Matteo Niccoli's cube YF color scale, as well as its decomposition in the HCL color space (aka CIELCH). This perceptually-based color scale features a monotonic increase in lightness (depicted in the grayscale version below the scale), while also changing hue.
This scale can be used to perform a color encoding of a quantitative variable, for example when displaying a heat map. Classic choices for such a case are rainbow scales (which have the problem of artefacts, making the encoding excessively non-linear) or grayscales (which are fine, but lack color information, which can be useful to perceive small changes or better identify areas with a similar value).
This comparison (taken from this Matteo Niccoli's post) shows the use of ROYGBIV, rainbow, cube YF and gray color scales to map elevation data.
All palette data is available as CSV and other formats from this link.
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js