expo-material-dynamic-colors
v1.0.0
Published
Module exposing the dynamic color palette from Material 3
Maintainers
Readme
expo-material-dynamic-colors
A module providing access to the dynamic material 3 colors on Android.
API
MATERIAL_YOU_SUPPORTED
A boolean value which is true when the device supports dynamic material theming and false otherwise.
useMaterialPalette
On Android returns the dynamic color palette:
export interface MaterialPalette {
systemAccent1: string[]
systemAccent2: string[]
systemAccent3: string[]
systemNeutral1: string[]
systemNeutral2: string[]
}On other platforms returns null.
useMaterialTheme
On Android returns the color theme built upon the color palette:
export interface MaterialColors {
primary: string
onPrimary: string
primaryContainer: string
onPrimaryContainer: string
secondary: string
onSecondary: string
secondaryContainer: string
onSecondaryContainer: string
tertiary: string
onTertiary: string
tertiaryContainer: string
onTertiaryContainer: string
error: string
onError: string
errorContainer: string
onErrorContainer: string
surfaceDim: string
surface: string
surfaceBright: string
surfaceContainerLowest: string
surfaceContainerLow: string
surfaceContainer: string
surfaceContainerHigh: string
surfaceContainerHighest: string
onSurface: string
onSurfaceVariant: string
outline: string
outlineVariant: string
inverseSurface: string
inversePrimary: string
inverseOnSurface: string
}On other platforms returns null.
