material-foundation / material-theme-builder

Visualize dynamic color and create a custom Material Theme.
https://material-foundation.github.io/material-theme-builder/
Apache License 2.0
360 stars 27 forks source link

`on-surface` is mapped incorrectly in dark mode #175

Closed PrattiDev closed 6 months ago

PrattiDev commented 1 year ago

Describe the bug on-surface in dark mode is mapped to the same color as on-surface-variant. This means that, in dark mode, there is no longer a difference in emphasis between the two, leading to inaccurate mockups.

To reproduce Steps to reproduce the behavior:

  1. Apply on-surface and on-surface-variant side by side in light mode. Observe that they have different colors.
  2. Switch the theme to dark mode.
  3. Observe that they are now the same color.

Expected behavior on-surface and on-surface-variant would be visually different. We can see how that would look by applying on-background to the first star, which is mapped to the proper color.

image

Screenshots of the error image

Additional context This is solely a plugin issue. On the latest alpha release of Jetpack Compose M3, the tokens are mapped correctly and in dark mode, on-surface and on-surface-variant do differ.