block by nitaku 0d563176b67c9d3062ae

HCL decomposition: cubeYF

Full Screen

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).

ROYGBIV, rainbow, cube YF and gray color scales compared

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.

index.js

index.html

index.coffee

index.css