
How We Generated 3,066 Colors Algorithmically — No Database Needed
Most color tools ship with a hand-picked palette of a few hundred swatches stored in a database or JSON file. We took a different approach with ColorArchive : every single color is generated at build time from three small arrays and some HSL math. No database, no API call, no JSON blob checked into the repo. Just code. Here's how — and what we learned along the way. The Problem with Curated Palettes Manually curating colors doesn't scale. You either end up with too few choices (Material Design's 256 colors leave gaps) or an unstructured dump that's hard to navigate. We wanted something systematic: a color space that's dense enough for real design work but organized so every color has a predictable, human-readable name. The constraint we set for ourselves: the entire dataset must be reproducible from a single function call with zero external dependencies. Three Arrays, 3,066 Colors The system breaks down into three dimensions mapped onto HSL (Hue, Saturation, Lightness): // 36 hue roots
Continue reading on Dev.to Webdev
Opens in a new tab




