rememberDynamicMaterialThemeState
Creates a DynamicMaterialThemeState that can be remembered across compositions using custom colors.
Parameters
The initial seed color to generate the color scheme.
The initial dark mode state.
The initial Amoled state.
A custom color to modify the primary color in the generated color scheme.
A custom color to modify the secondary color in the generated color scheme.
A custom color to modify the tertiary color in the generated color scheme.
A custom color to modify the neutral color in the generated color scheme.
A custom color to modify the neutral variant color in the generated color scheme.
A custom color to modify the error color in the generated color scheme.
The initial palette style.
The initial contrast level.
The initial spec version.
The initial platform.
Use this callback to modify the color scheme once it has been generated. Note that if you modify a color in the scheme, the on* color might not have enough contrast.
Deprecated
A primary color is an override on top of a seed now. Pass your color as the seed, and keep it as primary to get the colors this overload gives you. Removed in 7.0.
Replace with
rememberDynamicMaterialThemeState(seedColor = primary, isDark = isDark, isAmoled = isAmoled, primary = primary, secondary = secondary, tertiary = tertiary, neutral = neutral, neutralVariant = neutralVariant, error = error, style = style, contrastLevel = contrastLevel, specVersion = specVersion, platform = platform, modifyColorScheme = modifyColorScheme)Creates a DynamicMaterialThemeState that can be remembered across compositions using custom colors.
Note: The primary color is used as the seed color and as the primary override, so every palette in the scheme comes from it.
Parameters
The initial seed color, and the primary color of the generated color scheme.
The initial dark mode state.
The initial Amoled state.
A custom color to modify the secondary color in the generated color scheme.
A custom color to modify the tertiary color in the generated color scheme.
A custom color to modify the neutral color in the generated color scheme.
A custom color to modify the neutral variant color in the generated color scheme.
A custom color to modify the error color in the generated color scheme.
The initial palette style.
The initial contrast level.
The initial spec version.
The initial platform.
Use this callback to modify the color scheme once it has been generated. Note that if you modify a color in the scheme, the on* color might not have enough contrast.