Skip to main content
100%

ColorBrewer2.org - color advices for cartography

✓ Published0🌍 Public
Aant1j
Last edited Mar 13, 2016
Created on Mar 13, 2016

This example displays every ColorBrewer color scale as a clickable palette, with each scale reduced to its highest-class swatches. Clicking a palette prints that scale’s hexadecimal colors to the browser console. The page loads the colorbrewer.v1.min.js dataset and renders the palettes using D3 v3’s data join, appending span elements with inline background-color styles. It relies on d3.entries, d3.keys, and d3.descending to parse and sort the color values.

AI-generated description

[By Mike Bostock, for later reuse.]

A quick visual reference to every ColorBrewer scale; colors by Cynthia Brewer. Available in CSS and JS format. Click on a palette to log the constituent colors in hexadecimal RGB to the console.

forked from <a href='http://bl.ocks.org/hugolpz/'>hugolpz</a>'s block: <a href='http://bl.ocks.org/hugolpz/d7aabf5d5cde392e5b9c'>ColorBrewer2.org - color advices for cartography</a>

forked from <a href='http://bl.ocks.org/anonymous/'>anonymous</a>'s block: <a href='http://bl.ocks.org/anonymous/ce23ed7d2d72545f956d'>ColorBrewer2.org - color advices for cartography</a>

Similar vizzes