Job Alerts DS

Colors / Tokens

Token architecture, green brand, brand-vs-success disambiguation, light + dark.

Show audit of the app before this rule

Audit — what we have today

✓ Already right

  • Zero hardcoded hex colors in app code (only 1 rgb() shadow literal).
  • Custom --color-* RGB tokens exist with light + dark variants (32 usages, 10 files — mostly marketing pages).
  • Mantine theme sets primaryColor: "green" — brand routes through the framework.
  • Dark-mode brand is already lightened (74 222 128 vs 34 197 94) per dark-mode desaturation guidance.
  • Status hues mostly follow convention: green = won/applied, blue = read/replied, gray = inactive.

✗ Violations

  1. Three parallel token systems in app/globals.css: custom --color-* RGB triplets (32 uses), shadcn-style HSL vars (~30 defined, only 2 used — dead template residue), and raw Mantine palette vars (~70 uses).
  2. Raw Mantine palette steps as ad-hoc semantics: --mantine-color-gray-3 used 27× as "border", gray-08× as "muted surface" — no named role, dark mode works by luck.
  3. Per-page status color maps: priorityColor() / statusColor() live inside proposals-resource-roadmap-section.tsx — no central map.
  4. Brand green == success green: color="green"serves both "primary action" (Log proposal) and "positive status" (Won badge) — 25+ uses, meaning is ambiguous.
  5. Orphan accent: --color-accent (indigo) defined in both schemes, used once in a marketing gradient.

Dominant de-facto pattern: Mantine semantic props (c="dimmed" 154×, Badge/Button color names) + custom tokens only on marketing pages.

Axis 1 — Token architecture

Same dashboard sample under each option. The visual result is near-identical by design — the difference is which names code is allowed to reference.

Option A — Mantine-native canon

✓ CHOSEN

Mantine theme is the single base layer. Add a thin semantic alias layer (--gg-border, --gg-surface-muted…) that maps to Mantine vars. Delete the shadcn block. Marketing --color-* tokens re-pointed at the same aliases.

Recent proposals

Won
Replied
Awaiting

Senior Next.js developer for SaaS dashboard — $8k fixed · replied in 2 days

--gg-brand → green-6/4

brand + primary actions

--gg-border → default-border

replaces 27× gray-3

--gg-surface-muted

replaces 8× gray-0

+ Codifies the 95%-dominant pattern; smallest diff; dark mode free via Mantine.
− Marketing pages must migrate token names.

Option B — Custom token canon

Expand the existing --color-*RGB system into the single source; wire Mantine's theme colors FROM those tokens (custom green scale). Delete the shadcn block.

Recent proposals

Won
Replied
Awaiting

Senior Next.js developer for SaaS dashboard — $8k fixed · replied in 2 days

--color-brand

feeds Mantine theme.colors.green

--color-border

already defined, barely used in app

--color-surface-muted

marketing already uses it

+ One owned palette, framework-independent.
− Fights the dominant pattern: 70+ Mantine-var uses and every color="green" prop must be re-audited; custom 10-step scales to maintain for dark mode.

Option C — Status quo, documented

Keep both systems: --color-* for marketing, Mantine vars for app. Just delete the dead shadcn block and write down the split.

Recent proposals

Won
Replied
Awaiting

Senior Next.js developer for SaaS dashboard — $8k fixed · replied in 2 days

--color-* (marketing)

--mantine-* (app, raw steps)

gray-3 stays 'border' by convention

+ Zero migration.
− Two names for every concept forever; raw palette steps stay unsemantic; the 27× gray-3 problem never gets a name.

Axis 2 — Brand green vs success green

The brand is green AND its most important status (Won) is green. Two ways to keep them readable.

Option 1 — One green, roles split by treatment

✓ CHOSEN

Brand green appears ONLY as solid/filled (actions). Status green appears ONLY as soft (light badge) + always paired with an icon or label. Hue identical, treatment disambiguates.

Recent proposals

✓Won
Replied
Awaiting

Senior Next.js developer for SaaS dashboard — $8k fixed · replied in 2 days

+ No new colors; rule is enforceable by variant.
− Filled green badge is now forbidden — needs the rule written down.

Option 2 — Distinct success tone (teal-shifted)

Keep brand green for actions; shift status-positive to teal so "brand" and "outcome" never share a hue.

Recent proposals

✓Won
Replied
Awaiting

Senior Next.js developer for SaaS dashboard — $8k fixed · replied in 2 days

+ Unambiguous at a glance.
− Teal ≈ green to most eyes at badge size; adds a color to maintain in both schemes for marginal gain.

Shared rules (all options)

  • Brand is green — decided 2026-07-08, not up for re-vote here.
  • Delete the dead shadcn HSL block (~28 unused vars) whichever option wins.
  • Status tone map: green = positive outcome, amber = attention, red = urgent/destructive, blue = in-progress, gray = inactive. One central map, no per-page statusColor() functions.
  • Never color alone: every status badge pairs color with a label (and icon where space allows).
  • Contrast floors: 4.5:1 normal text, 3:1 large text and UI component boundaries (WCAG 1.4.3 / 1.4.11).
  • Dark mode: desaturate/lighten accents (~20 pts), depth via lighter surfaces not shadows.
  • No hardcoded hex/rgb in components — tokens or Mantine semantic vars only.
Show research sources
✓

Decision: Option A + Option 1

Why Option A (Mantine-native canon):

  1. The app is ~95% Mantine already — codify the dominant pattern, don't rewrite.
  2. Dark mode comes free: --gg-*aliases point at Mantine scheme-aware semantic vars instead of maintaining custom 10-step scales (Option B's cost).
  3. Option C would leave the 27× gray-3-as-border problem unnamed forever — two names per concept, no rule to enforce.

Why Option 1 (one green, treatment split):

  1. Teal ≈ green at badge size — Option 2 adds a color to maintain for marginal gain.
  2. The rule is enforceable by variant: filled green = brand action ONLY; status green = soft (light) badge + label/icon, never filled.

Applied at adoption:

  • Added --gg-border / --gg-surface-muted / --gg-surface / --gg-text / --gg-text-muted / --gg-brand / --gg-radius aliases (light + dark).
  • Deleted the dead shadcn HSL block (~30 vars); body CSS re-pointed at Mantine vars.
  • Swept the app: 27× gray-3 → --gg-border, 8× gray-0 → --gg-surface-muted.
  • Central status tone map (lib/status-colors.ts) replaces per-page statusColor() / priorityColor().
  • Kept --color-* RGB triplets as the marketing alpha-triplet layer (needed for rgb(var(--x) / a) gradients).

Design system for a freelance job-alert app. App copies are downstream.