
Material3 Theme Customization - ColorScheme, Typography & Dynamic Color
Material3 Theme Customization lightColorScheme/darkColorScheme val LightColors = lightColorScheme ( primary = Color ( 0xFF6750a4 ), onPrimary = Color . White , secondary = Color ( 0xFF625b71 ), error = Color ( 0xFFb3261e ) ) val DarkColors = darkColorScheme ( primary = Color ( 0xFFd0bcff ), onPrimary = Color ( 0xFF381e72 ), secondary = Color ( 0xFFccc7f0 ), error = Color ( 0xFFf9dedc ) ) Custom Typography val CustomTypography = Typography ( displayLarge = TextStyle ( fontSize = 57 . sp , fontWeight = FontWeight . Bold , fontFamily = FontFamily . SansSerif ), bodyMedium = TextStyle ( fontSize = 14 . sp , lineHeight = 20 . sp ) ) Shapes val AppShapes = Shapes ( small = RoundedCornerShape ( 4 . dp ), medium = RoundedCornerShape ( 8 . dp ), large = RoundedCornerShape ( 12 . dp ) ) Dynamic Color (Android 12+) val colorScheme = if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . S ) { val context = LocalContext . current dynamicLightColorScheme ( context ) } else { LightColors } DataSt
Continue reading on Dev.to Tutorial
Opens in a new tab

