dynamicColorScheme

fun dynamicColorScheme(seedColor: Color, isDark: Boolean, isAmoled: 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, isExtendedFidelity: Boolean = false, modifyColorScheme: (ColorScheme) -> ColorScheme? = null): ColorScheme

Create a custom ColorScheme based on the provided colors.

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

Parameters

seedColor

The color to base the scheme on.

isDark

Whether the scheme should be dark or light.

isAmoled

Whether the dark scheme is used with Amoled screen (Pure dark).

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.

isExtendedFidelity

Whether to use the extended fidelity color set. See MaterialDynamicColors.

modifyColorScheme

A lambda to modify the created ColorScheme.


fun dynamicColorScheme(primary: Color, isDark: Boolean, isAmoled: Boolean, secondary: Color? = null, tertiary: Color? = null, neutral: Color? = null, neutralVariant: Color? = null, error: Color? = null, style: PaletteStyle = PaletteStyle.TonalSpot, contrastLevel: Double = Contrast.Default.value, isExtendedFidelity: Boolean = false, modifyColorScheme: (ColorScheme) -> ColorScheme? = null): ColorScheme

Create a custom ColorScheme based on the provided colors. Uses primary as the seed color.

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

Parameters

primary

The color to base the scheme on, and primary color of the scheme.

isDark

Whether the scheme should be dark or light.

isAmoled

Whether the dark scheme is used with Amoled screen (Pure dark).

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.

isExtendedFidelity

Whether to use the extended fidelity color set. See MaterialDynamicColors.

modifyColorScheme

A lambda to modify the created ColorScheme.