Skip to main content
100%

Colorbrewer in D3

✓ Published0🌍 Public
AAlark Joshi
Last edited Mar 5, 2026
Created on Mar 5, 2026
Forked from D3 Starter

The example displays a visual index of color palettes, starting with D3’s built-in categorical scales (category10, category20, category20b, category20c) as rows of colored squares. It then iterates through all palettes from ColorBrewer via the external `colorbrewer` script, rendering each scheme’s largest available class count. The SVG visualization uses `d3.select` to append the graph, `d3.entries` to enumerate palettes, and `d3.keys` combined with `d3.descending` to determine the maximum color count per scheme.

AI-generated description
MIT Licensed

Similar vizzes