Open kazo0 opened 4 months ago
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
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"
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)