Rainbow Luminance
Two horizontal bands compare the HSL rainbow to its luminance-only counterpart. The top band uses `d3.hsl` to produce the full rainbow, while the bottom band converts that color to HCL via `d3.hcl` and sets chroma to zero, isolating perceived lightness. Both bands are drawn as 1-pixel-wide Canvas images stretched vertically, generated with `createImageData` and `putImageData`, and labeled to the left of each strip. The visualization demonstrates that the HSL rainbow’s brightness varies widely across hues, making it unsuitable for data encoding.
AI-generated descriptionThe HSL rainbow (all hues at 100% saturation and 50% lightness) has highly variable luminance: we perceive some parts of the rainbow, such as between yellow and cyan, as significantly brighter than other parts of the rainbow. This, along with a lack of perceptual uniformity, makes the rainbow color scale unsuitable for visualization. Use the Lab or HCL color space instead.