Skip to content

docs: the 6.x theme generator outputs a 5.x color scheme #5269

Open

Description

@Doberjohn

What happens

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.

Reported by a user on Discord. Part of #4991.

Activity

  1. added this to the 6.0.0 milestone on Nov 20, 2026
  2. added a commit that references this issue on Nov 20, 2026
    5104c47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions