Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

State object that holds the current values for a dynamic material theme.

Link copied to clipboard
class MaterialKolors(scheme: DynamicScheme, isAmoled: Boolean = false, isExtendedFidelity: Boolean = false)

A class that provides various color functions based on the given dynamic scheme.

Link copied to clipboard

The style of the palette to generate.

Properties

Link copied to clipboard

LocalDynamicMaterialThemeSeed is a CompositionLocal that provides the seed color for the dynamic material theme.

Functions

Link copied to clipboard
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.

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.

Link copied to clipboard
fun DynamicMaterialTheme(state: DynamicMaterialThemeState, shapes: Shapes = MaterialTheme.shapes, typography: Typography = MaterialTheme.typography, animate: Boolean = false, animationSpec: AnimationSpec<Color> = spring(stiffness = Spring.StiffnessLow), content: @Composable () -> Unit)

A Material Theme that adapts to the given DynamicMaterialThemeState.seedColor.

fun DynamicMaterialTheme(primary: Color, useDarkTheme: Boolean = isSystemInDarkTheme(), withAmoled: Boolean = false, secondary: Color? = null, tertiary: Color? = null, neutral: Color? = null, neutralVariant: Color? = null, error: Color? = null, style: PaletteStyle = PaletteStyle.TonalSpot, contrastLevel: Double = Contrast.Default.value, shapes: Shapes = MaterialTheme.shapes, typography: Typography = MaterialTheme.typography, isExtendedFidelity: Boolean = false, animate: Boolean = false, animationSpec: AnimationSpec<Color> = spring(stiffness = Spring.StiffnessLow), content: @Composable () -> Unit)
fun DynamicMaterialTheme(seedColor: Color, useDarkTheme: Boolean = isSystemInDarkTheme(), withAmoled: Boolean = false, 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, shapes: Shapes = MaterialTheme.shapes, typography: Typography = MaterialTheme.typography, isExtendedFidelity: Boolean = false, animate: Boolean = false, animationSpec: AnimationSpec<Color> = spring(stiffness = Spring.StiffnessLow), content: @Composable () -> Unit)

A Material Theme that adapts to the given seed color and the provided custom colors.

Link copied to clipboard
fun rememberDynamicColorScheme(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 and remember a custom ColorScheme based on the provided colors. Uses primary as the seed color.

fun rememberDynamicColorScheme(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 and remember a custom ColorScheme based on the provided colors.

Link copied to clipboard
fun rememberDynamicMaterialThemeState(primary: Color, isDark: Boolean, isAmoled: Boolean = false, secondary: Color? = null, tertiary: Color? = null, neutral: Color? = null, neutralVariant: Color? = null, error: Color? = null, style: PaletteStyle = PaletteStyle.TonalSpot, contrastLevel: Double = Contrast.Default.value, extendedFidelity: Boolean = false, modifyColorScheme: DynamicMaterialThemeState.(ColorScheme) -> ColorScheme? = null): DynamicMaterialThemeState
fun rememberDynamicMaterialThemeState(seedColor: Color, isDark: Boolean, isAmoled: Boolean = false, 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, extendedFidelity: Boolean = false, modifyColorScheme: DynamicMaterialThemeState.(ColorScheme) -> ColorScheme? = null): DynamicMaterialThemeState

Creates a DynamicMaterialThemeState that can be remembered across compositions using custom colors.

Link copied to clipboard
fun DynamicScheme.toColorScheme(isAmoled: Boolean, isExtendedFidelity: Boolean = false, modifyColorScheme: (ColorScheme) -> ColorScheme? = null): ColorScheme

Create the actual ColorScheme based on the given DynamicScheme.