rememberDynamicScheme

fun rememberDynamicScheme(palette: PaletteState<*>, fallback: Color, isDark: Boolean, primary: Color? = null, secondary: Color? = null, tertiary: Color? = null, neutral: Color? = null, neutralVariant: Color? = null, error: Color? = null, style: PaletteStyle = PaletteStyle.TonalSpot, contrastLevel: Double = Contrast.Default.value, specVersion: ColorSpec.SpecVersion = ColorSpec.SpecVersion.Default, platform: DynamicScheme.Platform = DynamicScheme.Platform.Default): DynamicScheme

Create and remember a DynamicScheme seeded by the image palette generated from.

The seed is the scored color of the last successful generation, so the scheme is built from fallback until there is a palette and rebuilt from the image once there is one.

If a color is not provided, then the color palette will be generated from the style and the seed.

Return

The generated DynamicScheme.

Parameters

palette

The PaletteState to read the seed color from.

fallback

color to seed the scheme with until palette has a suitable one.

isDark

Whether the scheme should be dark or light.

primary

The primary color of the scheme.

secondary

The secondary color of the scheme.

tertiary

The tertiary color of the scheme.

neutral

The neutral color of the scheme.

neutralVariant

The neutral variant color of the scheme.

error

The error color of the scheme.

style

The style of the scheme.

contrastLevel

The contrast level of the scheme.

specVersion

The version of the color specification to use.

platform

The platform to use for the scheme.