Skip to content

fix(website): give arch-flow console badges an on-dark palette - #1060

Merged
blove merged 1 commit into
mainfrom
blove/fix-arch-flow-badge-contrast
Sep 8, 2026
Merged

fix(website): give arch-flow console badges an on-dark palette#1060
blove merged 1 commit into
mainfrom
blove/fix-arch-flow-badge-contrast

Conversation

@blove

@blove blove commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What

The developer-console panel in ArchFlowDiagram paints a hardcoded #1a1b26 ground. It is not a [data-ui="section"][data-surface="dark"] scope, so it never inherits that scope's re-pointed --color-* values — the light-surface tokens landed on it unchanged. All four .arch-flow-log-source badges failed contrast against it.

Measured against the composited badge ground (tint over #1a1b26), before this change:

variant ink ratio
langgraph var(--color-accent)#15253E 1.13:1
transport #5e35b1 2.01:1
angular #c62828 2.95:1
signal #059669 4.03:1

Most of this predates the ATC retheme, but langgraph does not: the retheme pointed it at --color-accent, which resolves to scope navy #15253E at :root, so that badge renders near-black on near-black.

Approach

Section-scoping the panel was a non-starter — [data-surface="dark"] carries section padding, a navy gradient background and a ::before accent seam, and its surfaces are neutral greys rather than #1a1b26. Instead the panel declares a local on-dark palette in its own rule block and the badges read from it. Each keeps its hue identity (Angular red, transport purple, aviation yellow, render green) as a light ink over a 0.14-alpha tint of the same hue.

Verification

Ratios read off the rendered page via getComputedStyle, compositing every background layer up to the first opaque ancestor — not against white:

variant ink composited ground ratio
angular #ff9e9e rgb(53, 23, 40) 8.14:1
transport #c3b0ff rgb(42, 40, 65) 7.40:1
langgraph #FFAF00 rgb(58, 48, 33) 7.03:1
signal #5fe3b0 rgb(25, 49, 51) 8.57:1

All clear 4.5:1 with margin, which the 8px/600 type needs. Aviation yellow works as ink here — 9.27:1 bare, 7.03:1 once its own tint lightens the ground — where on white it is a fill only at 1.84:1.

Also verified: all four variants render legibly and stay distinguishable by hue; style-contracts.spec.ts + font-vars.spec.ts pass (97 tests); no console errors; no test or guard asserted the old hexes.

Not included

.arch-flow-console-title and .arch-flow-log-time use #4A527A on the same panel at 2.26:1 — same defect class, same component, but outside the scope of this fix. Worth a follow-up.

🤖 Generated with Claude Code

The developer-console panel in ArchFlowDiagram paints a hardcoded #1a1b26
ground. It is not a [data-ui="section"][data-surface="dark"] scope, so it
never inherits that scope's re-pointed --color-* values and the light-surface
tokens landed on it unchanged. All four source badges failed contrast against
the composited badge ground: angular 2.95:1, transport 2.01:1, signal 4.03:1,
and langgraph 1.13:1 — the ATC retheme pointed that one at --color-accent,
which resolves to scope navy #15253E at :root, so it rendered near-black on
near-black.

Scoping the panel as a dark section was not an option: that scope carries
section padding, a navy gradient background and a ::before accent seam, and
its surfaces are neutral greys rather than #1a1b26. Instead the panel now
declares a local on-dark palette and the badges read from it, keeping each
hue identity as a light ink over a 0.14-alpha tint of the same hue.

Ratios measured on the rendered page via getComputedStyle, compositing every
background layer up to the first opaque ancestor (not against white):
angular 8.14:1, transport 7.40:1, langgraph 7.03:1, signal 8.57:1. Aviation
yellow carries text at 7.03:1 on this ground, where on white it is a fill
only at 1.84:1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Sep 8, 2026 2:49pm UTC

Request Review

@blove
blove enabled auto-merge (squash) September 8, 2026 14:46

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 845fd53 into main Sep 8, 2026
33 checks passed
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