Skip to content

feat: write each poster label in its paired M3 role, as Material Theme Builder does - #218

Merged
abernier merged 2 commits into
mainfrom
claude/material-theme-builder-labels-f4cc2c
Oct 6, 2026
Merged

abernier merged 2 commits into
mainfrom
claude/material-theme-builder-labels-f4cc2c

Conversation

@abernier

@abernier abernier commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

What

Each label of the Scheme / Shades poster is now written in the M3 role it is paired with, the way the official Material Theme Builder poster paints them, instead of white in mix-blend-mode: difference:

  • primary reads in on-primary, on-primary in primary, and so on for every * / on-* and *-container / on-*-container pair (primary, secondary, tertiary, error, custom colors);
  • the surface family (surface-dim ... surface-container-highest, outline-variant) in on-surface; on-surface and outline in surface; on-surface-variant in surface-variant;
  • inverse-surface / inverse-on-surface swapped, inverse-primary in on-surface;
  • scrim and shadow, black in both schemes, in plain white;
  • tones 80 and up in black, the rest in white.

The fixed accents, which the official poster does not draw, follow the same pairing (primary-fixed* in on-primary-fixed, on-primary-fixed* in primary-fixed), as do the dropped roles (background / on-background, surface-variant in on-surface-variant, surface-tint in on-primary).

The Tailwind story's hand-written tiles follow suit: text-on-myCustomColor1 & co. for the custom colors, black on shades 50 to 200 (tones 95 to 80) and white below.

In tw mode the ink stays a var(--md-sys-color-*): that mode is about the bg-* utilities resolving.

How the pairing was read

The official app is a Flutter canvas, so its poster was pixel-sampled: tile backgrounds segmented, each label's glyph color matched hex-equal against the other tiles' backgrounds in the same scheme, on both the light and dark scheme and the six tonal palette rows.

Checks

  • pnpm run lgtm green (318 tests).
  • Storybook checked by computed style: every label's color equals its paired role's background, on light, dark, custom colors and tones.
  • Chromatic will flag every poster story: expected, every label changes color.

Pre-existing, out of scope: in the Tailwind story the Secondary tile renders light (bg-secondary collides with shadcn's theme).

🤖 Generated with Claude Code

abernier and others added 2 commits October 6, 2026 12:15
…e Builder does

`primary` reads in `on-primary`, `on-primary` in `primary`, the surface
family in `on-surface`, `outline` in `surface`, `inverse-primary` in
`on-surface`, `scrim` and `shadow` in plain white; tones 80 and up in black,
the rest in white -- the way the official app's poster paints them, instead
of white in `mix-blend-mode: difference`.

The fixed accents, which that poster does not draw, follow the same pairing,
as do the custom colors and the dropped roles.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Tailwind story draws its custom-color tiles and tonal shades by hand, as
literal utility classes, outside `Scheme` and `Shades` -- so the pairing did
not reach them. Each tile now reads in its pair (`text-on-myCustomColor1`),
and shades 50 to 200 (tones 95 to 80) in black, the rest in white.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@abernier
abernier marked this pull request as ready for review October 6, 2026 10:49
@abernier
abernier merged commit 5d9a8f4 into main Oct 6, 2026
5 of 6 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