Colorspaces
✓ Published0🌍 Public
AAlec Burch
Last edited Jun 15, 2016
Created on Jun 14, 2016
This visualization maps the HCL color space onto a 960-by-500 pixel canvas, with hue varying horizontally and lightness varying vertically at full chroma. Each pixel is drawn individually using Canvas’s `fillRect` method, and the color is computed via `d3.hcl()` from the d3-color API. The result is a smooth gradient that reveals the perceptual structure of the HCL space, where horizontal bands show hue transitions and vertical shifts alter lightness. The code uses `d3.range()` to iterate over every pixel, and the page includes the d3-hsv and d3-scale-chromatic libraries, though only the HCL constructor is exercised here.
AI-generated description