N Colors
✓ Published0🌍 Public
Sixteen vertical rectangles fill the viewport, each displaying a distinct color generated in HCL color space. Hue cycles evenly around the color wheel while chroma stays fixed at 50, and luminance varies randomly following a normal distribution centered at 30 with a standard deviation of 10. The example uses d3.scaleBand for layout, d3.scaleOrdinal for color assignment, and d3.hcl to construct colors with random luminance from d3.randomNormal and d3.randomLcg.
AI-generated descriptionAn approach for generating an arbitrary number (N) of colors.
In HCL (Hue-Chroma-Luminance) color space:
- Hue varies around the color wheel.
- Chroma (saturation) is fixed.
- Luminance is random according to a normal distribution.
This is the color scheme approach used in D3 Git History Streamgraph.
ISC Licensed