Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Material] Add support for tone-based surface colors #1442

Open
kazo0 opened this issue Jul 4, 2024 · 2 comments
Open

[Material] Add support for tone-based surface colors #1442

kazo0 opened this issue Jul 4, 2024 · 2 comments

Comments

@kazo0
Copy link
Collaborator

kazo0 commented Jul 4, 2024

Given the deprecation of the surface tint color system and the removal of the SurfaceTint extensions, we need a way to enable the dynamic color roles for the surface-based brushes in Material.

The new way for dealing with tonal color roles for Surface is outlined in this documentation.

We need to find a way to handle the dynamic generation of these color roles for the Brushes that are based on SurfaceColor.

While we're at it, we should also look into the Bright/Dim Surface Color (Might need to be a separate issue. Mentioning here as maybe the implementation will be affected)

@kazo0
Copy link
Collaborator Author

kazo0 commented Jul 4, 2024

I'm thinking we will need to dynamically create and inject some SolidColorBrush resources during the init process of MateialTheme. So we can read the values for SurfaceColor that is provided, or overridden, and then generate some Surface[Container][Lowest][Low][etc.]Brush resources

@mikernet
Copy link

mikernet commented Jul 4, 2024

The colors for the tonal surface roles are already in the material theme json export from the material theme builder, the Dsp tool just doesn't map them to colors and brushes:

      "surfaceDim": "#E8D6D4",
      "surfaceBright": "#FFF8F7",
      "surfaceContainerLowest": "#FFFFFF",
      "surfaceContainerLow": "#FFF0EE",
      "surfaceContainer": "#FCEAE7",
      "surfaceContainerHigh": "#F6E4E2",
      "surfaceContainerHighest": "#F1DEDC"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants