Skip to content

feat(app): color and corner tokens that read in both themes - #136

Merged
httpsphl merged 1 commit into
mainfrom
feat/design-tokens
Oct 3, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/design-tokens

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Design system, slice 2: color and corner tokens.

Decisions taken with the owner: darken the light-theme text colors that fail WCAG AA and keep the orange fill, using a separate token for orange text; fold rounded-md into 8 px.

Colors (light theme; dark is unchanged)

Token Before After Worst background, before → after
muted (and idle-state) #6f6f69 #5f5f59 sunken 4.15 → 5.28
ok #1d7f46 #17703d sunken 4.13 → 5.04
warn #a35f00 #8a5000 sunken 4.11 → 5.34
danger #c2372a #bd3529 sunken 4.45 → 4.66
accent-text (new) (accent #d9481f, 3.52) #b83a14 sunken 4.72
  • accent stays the fill for buttons, badges, borders and icons (icons need 3:1, which they meet). The five places that wrote words in orange now use text-accent-text. In the dark theme it is the same #ff7a59.
  • New tokens: scrim (the dialog backdrop, which was bg-black/50) and close (Windows' close-button red, which was a hex literal in TitleBar and Setup).
  • ui/tokens.test.ts reads index.css and checks that every text color (ink, ink-soft, muted, accent-text, ok, work, warn, danger, idle-state) reads at 4.5:1 or more on canvas, panel and sunken, in both themes. It is what caught danger on sunken, which the earlier audit had missed.

Corners

  • The 17 uses of rounded-md (6 px) become rounded-lg (8 px), so the scale is 8, 12 and 16 px, plus rounded-full.

Left out on purpose

Artwork keeps its own colors: the mascot, the bot cursor, the color picker's hues, and the white page behind an HTML screen. Spec 15.3 now lists the tokens and these exceptions.

Checks

  • pnpm check passes (327 tests). Checked in the pnpm dev preview, light theme.

Light-theme muted, ok, warn and danger get darker so every text color
reads at 4.5:1 on canvas, panel and sunken; the accent stays as a fill
and words in it use the new accent-text. Dialog scrim and the close
button's red become tokens, rounded-md folds into 8 px, and
ui/tokens.test.ts checks the contrast of every text token in both
themes. Spec 15.3 lists the tokens.
@httpsphl
httpsphl enabled auto-merge October 3, 2026 17:41
@httpsphl
httpsphl merged commit d1378e3 into main Oct 3, 2026
4 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