Skip to content

Restore the dark theme's warmth, and the terracotta accent - #801

Merged
edspencer merged 2 commits into
mainfrom
fix/restore-warmth
Aug 10, 2026
Merged

Restore the dark theme's warmth, and the terracotta accent#801
edspencer merged 2 commits into
mainfrom
fix/restore-warmth

Conversation

@edspencer

Copy link
Copy Markdown
Owner

The 0.67.0 token pass neutralised the dark ground. This puts the warmth back, measured against the UI it replaced rather than eyeballed.

What was actually wrong

before this PR restored
page ground #1f1d19-family, chroma 0.006 @ hue 88 #141210
assistant prose card chroma 0.0075 @ hue 88 #28221a — chroma 0.017 @ hue 74.8
accent text (dark) #d58a6f — accent lifted 26% to white #cd7758 — lifted 14%
accent fills/borders OKLab mix at 16%/45% sRGB mix at 10%/30% — the old alphas

The old values were recovered by decoding a screenshot of the previous UI and sampling pixels, not by reading the old Tailwind config — so what landed is what was on screen. Verified the same way afterwards: the running build paints #141210 and #28221a, byte-identical to the reference.

Three things worth knowing before reviewing

1. The prose card's lightness barely moved. The report was "further from black", but 0.232 → 0.256 says otherwise. What halved was chroma. The problem was warmth, not depth, and fixing the wrong one would not have helped.

2. The old orange cannot come back as text, and this is the interesting constraint. Raw #c2603c measures 3.77:1 on the prose card and 3.5:1 on --surface-active — below AA. Restoring it literally would have made contrast worse, which is the opposite of what was asked for. So the lift is now the least that clears 4.5:1 against every dark surface: 14%, giving #cd7758, much closer to the original terracotta than the salmon it replaces. --surface-active is the binding constraint — 12% misses it by 0.05, which only the full sweep catches. Note --accent itself never changed in 0.67.0; only its derivations did.

3. Fills had to be mixed in sRGB. The old sub-agent strip was literally bg-accent/10 over the page, and 10% of #c2603c over #141210 composites to #251a14 — the exact pixel in the reference. An OKLab mix of the same two endpoints lands somewhere else. Matching the mix space matters as much as the percentage. resolveColor gains in srgb support so the contrast suite can evaluate these tokens instead of throwing.

Deliberately not done

  • The three interaction surfaces keep the ladder's lightness and take only its warmth. The first attempt restored the old paddock-800 (#3e3528) as --surface-active and broke six contrast tests — it was a border colour in the old UI that a few places reused as a fill. Restoring it drops --text-subtle to 3.75:1.
  • --surface-sunken is not the old paddock-950, which was lighter than the page it sat on — not what a sunken surface means in this system.
  • Solid accent fills are untouched. The send button and user bubble stay on the 600 step (#a84e2f); white on the old #c2603c is 4.17:1, below AA on the most-clicked control in the app. Restoring that is a taste-versus-standard trade and deliberately left as a separate decision.
  • Light mode is untouched.

Verification

  • All 1721 web tests pass, including the 79 contrast pairs across both modes.
  • Typecheck clean.
  • Reviewed live on a seeded instance in dark mode before opening.

🤖 Generated with Claude Code

The token pass neutralised the dark ground. The assistant prose card went from
chroma 0.017 to 0.0075, at hue 88 rather than the old ramp's 67-77, and a
palette that read as brown started reading as grey. Its LIGHTNESS barely moved
(0.232 vs 0.256) — worth stating because the complaint that prompted this was
"further from black", and the measurement says the opposite. Warmth, not depth.

`--surface` and `--surface-raised` are restored to the pre-token UI's values,
sampled from a screenshot of it rather than recovered from the config, then
verified against rendered pixels: the page paints #141210 and the prose card
#28221a, byte-identical to the reference.

Accent text was lifted 26% toward white, which turns terracotta into salmon
(#c2603c -> #d58a6f) — the change people mean when they say "the orange
changed"; `--accent` itself never moved. The raw accent cannot simply come
back: it measures 3.77:1 on the prose card and 3.5:1 on the active surface,
both below AA, so restoring it literally would make contrast worse rather than
better. The lift is now 14%, the least that clears 4.5:1 against EVERY dark
surface — `--surface-active` is the binding constraint and 12% misses it by
0.05.

Fills and borders carry no text and are restored exactly, which needs the mix
done in sRGB rather than OKLab: the old sub-agent strip was `bg-accent/10`
composited over the page, and only an sRGB mix of the same two endpoints lands
on that same #251a14. `resolveColor` gains `in srgb` so the contrast suite can
evaluate them.

The three interaction surfaces are deliberately NOT restored to their old
hexes. The old `paddock-800` was a border colour that some places reused as a
fill; adopting it as `--surface-active` drops `--text-subtle` to 3.75:1. They
keep the ladder's lightness and take only its warmth.

All 1721 web tests pass, including the 79 contrast pairs. Light mode untouched.

Co-Authored-By: Claude <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploying paddock with  Cloudflare Pages  Cloudflare Pages

Latest commit: e41fc3f
Status: ✅  Deploy successful!
Preview URL: https://b9544861.paddock-7u2.pages.dev
Branch Preview URL: https://fix-restore-warmth.paddock-7u2.pages.dev

View logs

@edspencer
edspencer merged commit 323cddd into main Aug 10, 2026
5 checks passed
@edspencer
edspencer deleted the fix/restore-warmth branch August 10, 2026 01:55
@github-actions github-actions Bot mentioned this pull request Aug 10, 2026
edspencer pushed a commit that referenced this pull request Aug 10, 2026
root-home, adopt-row, adopt-modal, project-settings and the trigger tool
picker were all shot before the design work landed (#763/#768/#769/#780/#801).
Every one showed chrome, surfaces, type and accent the redesign replaced, on
pages whose prose is in the present tense.

Shot from the docs-media rig at v0.69.0, Foundation/dark, hue null, tint 0 —
the out-of-the-box appearance.  capture.mjs now pins the theme via
addInitScript (the keys are read by a pre-paint script, so a post-goto
evaluate catches a mid-swap frame) and asserts it applied.
edspencer added a commit that referenced this pull request Aug 11, 2026
Inline `code` in a chat message had no visible background and blockquotes had
gone grey. Two different causes, both from the token migration.

The chip borrowed `--surface-active`. That worked until a surface moved: #801
restored `--surface-raised` to the pre-token prose card (#28221a) and the gap
between the chip and the card it sits on closed to 1.036:1. The chip never
changed; the card rose to meet it, and every contrast assertion stayed green
because no test pairs a fill with the surface it sits ON.

It cannot simply ride `--surface-active` again. That token is pinned near the
top of the interaction ladder by `--text-subtle`, which must clear 4.5:1 on it;
at the lightness the chip wants (L 0.319) `--text-subtle` measures 3.95:1. A
chip only ever carries `--text` (10.5:1 there), so it can afford a lightness the
interaction fills cannot — which is the argument for a token of its own rather
than a re-tuned ladder. `theme-foundation.css` already refuses the same lift for
the same reason.

Blockquotes are simpler: they take `--text-muted`, and the new ramp holds the
old hue (88 vs 86.5) at a quarter of the chroma (0.015 vs 0.059). Warm to grey
is the whole of what "the blockquote lost its colour" means.

So: `--code-fill`, `--quote-text` and `--quote-border`, set to the MEASURED
values of the pre-token UI rather than re-derived — #3a3125, #a4926a, #5b4d39 in
dark, sampled from a v0.66.1 screenshot the way the dark surfaces were. The
painted pixels now match that screenshot exactly. Light mode restores the warmth
only and not the lightness, because the old light muted step was one of the ones
that failed AA at 3.75:1.

Parchment, Terminal and Sci-Fi alias the three back to the ladders and are
byte-identical before and after — verified by reading computed styles for all
four themes in both modes, not by inspection. Parchment's chrome slab restates
them alongside the rest of the semantic set it redeclares.

Guarded in both `tokens.test.ts` and `themes.test.ts`: the chip must clear
1.15:1 against `--surface-raised` in every theme and mode. Confirmed to FAIL at
the old `var(--surface-active)` value, dark mode only — which is exactly where
the bug was.

Co-authored-by: HomeLab Agent <homelab-infra@valfenda.net>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant