{
  "subject": "color",
  "title": "Color",
  "docs": "https://test-apps.eurodata.de/a/eurodata-ui/docs/theming/color/",
  "usage": "https://test-apps.eurodata.de/a/eurodata-ui/docs/theming/color/usage/",
  "use": [],
  "notFor": [],
  "rules": [
    {
      "id": "color/role-tokens-first",
      "rule": "Reach for a role token first — `--ed-color-surface-*`, `--ed-color-text*`, `--ed-color-border*` — and fall back to a semantic scale (`--ed-color-neutral-N`, `--ed-color-brand-N`, …) only where no role token fits. Never use a palette token (`--ed-color-coolgray-N`, …) or a palette token's deprecated name (`--ed-color-surfie`, …) directly.",
      "why": "A palette token does not follow a theme.",
      "check": "error"
    },
    {
      "id": "color/no-hard-coded-color",
      "rule": "Never write a hex or rgb value where a token exists.",
      "check": "error"
    },
    {
      "id": "color/text-in-its-role",
      "rule": "Give text the color of its role — `--ed-color-text`, `--ed-color-label`, `--ed-color-title` — so it keeps its contrast in every theme.",
      "check": "warning"
    },
    {
      "id": "color/on-token-on-fill",
      "rule": "Set text on a colored fill in that fill's own `on` token — on `--ed-color-danger-fill-normal`, `--ed-color-danger-on-normal` — never in a text token of another color family.",
      "check": "error"
    },
    {
      "id": "color/derive-hover-and-active",
      "rule": "Derive hover and active states with `color-mix(in oklab, <base>, var(--ed-color-mix-hover))`, or `-active` — never pick a second color by hand.",
      "check": "warning"
    },
    {
      "id": "color/mix-labeled-fill",
      "rule": "Mix a fill that carries a label with `--ed-color-mix-hover-fill` / `-active-fill`, and that label with `-hover-text` / `-active-text`."
    }
  ]
}
