Skip to content

How Theme Tokens works

Browse the Material 3 color roles that style jakelawrence.xyz, grouped by job. Each swatch is painted from the page as it is right now, so it follows the look (Material or Glass) and the scheme (light or dark); click to copy the hex.

Reads each role as a CSS custom property, resolves it through a hidden probe element and re-resolves whenever the theme attributes on the html element change, picking legible label text from each color's luminance.

Questions

Where do these values come from?
From the page itself. Each swatch reads a --md-sys-color-* custom property, which the generated theme stylesheet defines for every look and scheme.
Do these change in dark mode?
Yes. Switch the scheme or the look and the swatches re-resolve, so you see what the site actually paints.
How do I use a role?
In CSS, var(--md-sys-color-primary). In JavaScript, the legacy T accessor shown beside a role (for example T.red) is a var() pointing at it.

More Generate tools

All the tools · How to check that nothing is sent

Theme Tokens Reference: Material 3 Color Roles | Only in the Tab