You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: the 6.x theme generator outputs a 5.x color scheme #5269
The theme generator in the 6.x theming guide ("Creating dynamic theme colors", docs/src/components/DynamicColorTheme.tsx with docs/src/utils/themes.tsx) builds its schemes with themeFromSourceColor from @material/material-color-utilities 0.2.4, Material's original 2021 scheme. On 6.x that causes three problems:
Missing roles. The output has no surfaceDim, surfaceBright, surfaceContainerLowest to surfaceContainerHighest or the fixed roles, which 6.x components read. Pasted into a theme as the guide shows, those roles keep the default colors.
Old keys. It outputs surfaceDisabled, onSurfaceDisabled and backdrop, which the 6.x theme doesn't have, and elevation colors made by mixing surface with 5% to 14% of primary, where 6.x uses the surface container tones.
Hard to read in dark mode.background and surface are the same tone, so a Card or a Surface barely stands out: for #1E88E5 the background is #1a1c1e and elevation.level1 is #212529, a 1.11:1 contrast.
It also moves the inputs a long way: for #1E88E5, primaryContainer comes out #d3e4ff, where Material's color match mode (SchemeFidelity) keeps it at #0077ce.
Expected
The generator on the 6.x page outputs exactly the 6.x color roles, built from Material's current dynamic scheme (dark surfaces on the surface container tones), with an option to stay close to the input colors. The 5.x page keeps its current output.
Activity
docs: generate 6.x color roles in the 6.x theme generator