{
  "id": 10983660,
  "title": "Stop writing hex codes in your CSS",
  "url": "https://urgent.news/2026/09/30/stop-writing-hex-codes-in-your-css",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-30T16:30:41.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/alexandersstudi/stop-writing-hex-codes-in-your-css-39jf"
  },
  "original_language": "en",
  "account": "Last Monday's design review sparked frustration over a subtle button hover issue. A lead designer spotted a hard-coded #3B82F6 hex code in a styled component, despite the primary blue changing to #2563EB three months prior. The developer copied the hex directly from Figma and never updated it, creating technical debt that broke visual consistency. This scenario is common across codebases worldwide, wasting developer time and causing potential errors. Scaling the issue, introducing dark mode requires separate style blocks for each theme, doubling maintenance burden and making components rigid. For multi-brand products, this process becomes even more cumbersome, with developers having to manage multiple theme configurations. While some may argue CSS tokens are unnecessary for small projects, the reality is that hardcoding hex values is a costly mistake. Semantic variable names offer a more efficient, adaptable solution that simplifies updates and maintains visual consistency across designs. Tools like Design System Sync can automate the process of syncing design tokens between Figma and code, reducing manual errors and streamlining the development workflow.",
  "summary": "The hover state that started it all A design review last Monday morning really got under my skin. Our lead designer noticed a subtle mismatch in a button hover state. I opened the component file to check the code. Right there in the styled component was a hardcoded #3B82F6 . The problem is our primary brand blue changed to #2563EB three months ago. This developer had just copied the hex code…",
  "key_points": [
    "Lead designer spotted hard-coded hex code in styled component.",
    "Copying hex from Figma without updating caused technical debt.",
    "CSS tokens streamline updates and maintain visual consistency."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}