Skip to content

feat: theme-calculated Harmoniqs yellow — OKLCH-solved brand accent - #86

Closed
kateebonner wants to merge 1 commit into
kate/46-template-paramsfrom
kate/46-brand-accent
Closed

feat: theme-calculated Harmoniqs yellow — OKLCH-solved brand accent#86
kateebonner wants to merge 1 commit into
kate/46-template-paramsfrom
kate/46-brand-accent

Conversation

@kateebonner

Copy link
Copy Markdown
Contributor

Middle slice of the UX1 stack (2/3), no interview dependency — the brand accent system for ALL webviews.

brand_accent.ts solves the deployed accent from the active theme at boot: canonical #FFF676 ships exactly wherever contrast vs the editor background clears 3:1 (all dark themes); light themes get the closest-to-brand gold (lightness binary-searched, hue+chroma held, gamut-clamped). Two tokens with different jobs: lines (--color-accent, contrast-solved — borders/rings/marks) and fills (--color-accent-fill, always the brand lemon: black text on it ≈ 19:1, where a 3:1-darkened gold passes WCAG arithmetic but reads muddy). --color-on-accent is contrast-picked; yellow is never text. Recomputes live on theme switch; brand.css statics are the no-JS fallback. Pill atom gains a dot-less badge variant.

6 solver unit tests (brand-exact on dark/gray, hue-held solve on light, fill/text invariants, color parsing, OKLCH round-trip).

Stack: #template-params → this → #82.

🤖 Generated with Claude Code

…brand-wide)

brand_accent.ts computes the deployed accent from the active theme at
webview boot: the canonical #FFF676 ships EXACTLY wherever contrast vs
the theme's editor background clears 3:1 (all dark themes); light themes
get the closest-to-brand gold by binary-searching lightness with hue +
chroma held (gamut-clamped). Two tokens with different jobs: lines
(--color-accent, contrast-solved: borders/rings/marks) and fills
(--color-accent-fill, always the brand lemon — black text on it ≈ 19:1;
a 3:1-darkened gold passes WCAG math but reads muddy under text).
--color-on-accent is contrast-picked; yellow is never text. Recomputed
live on theme switch. Inspector + catalog-card webviews apply at boot;
brand.css statics remain the no-JS fallback. Pill atom gains a dot-less
badge variant (dot = process state; badges describe things).

Co-Authored-By: Claude Fable 5 <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