🌍 Public
Viewing a saved revision (read-only)
c19cb909e82941099d6c93a02d2aca26
Pie of CSS Colors
This example displays all named CSS colors as stacked horizontal stripes, one per row, using each color’s RGB hex value as the background. The React app fetches a CSV of named colors via `d3.csv`, stores the result in state with `useState`, and maps over the data to render a series of divs with fixed width and height. The visualization relies on React’s `useEffect` for data loading and ReactDOM for mounting, with D3 used solely for CSV parsing.
AI-generated descriptionReact Starter code.