Skip to main content
100%

Colours Page

✓ Published0🌍 Public
Dd3noob
Last edited Nov 27, 2019
Created on Nov 27, 2019

This example displays a grid of color swatches, each labeled with its corresponding named color value. It uses the d3.csv function to load color names from a CSV file and then creates an SVG for each entry. Each SVG contains a rounded rectangle filled with the color, a text label with a white shadow for readability, and a bold black text overlay showing the color's name.

AI-generated description

This is an example of the range of available named colours that can be used in d3.js. In this example I have used colour groupings that keep similar colours together. These are not quite all the available colours, but there's only a few missing.

Advice can be found on-line that not all browsers will render them correctly. I have tested with Chrome and Firefox and found them suitably visible.

These are used as references and described in the book D3 Tips and Tricks v5.

mit Licensed

Similar vizzes