
Enhances app interfaces with dynamic color support, light and dark themes, and Material 3 design principles. Offers easy customization for consistent aesthetics on Android 12+ and Windows.
build.gradle file:implementation 'io.github.jason3859:dynamic-material-theme:2.0.0'or build.gradle.kts file:
implementation("io.github.jason3859:dynamic-material-theme:2.0.0")DynamicMaterialTheme composable in your app:@Composable
fun MyApp() {
DynamicMaterialTheme {
// Your app content
}
}That's it! You can now enjoy dynamic colors in your app.
@Composable
fun DynamicColorTheme(
isDarkMode: Boolean = isSystemInDarkTheme(),
defaultLightScheme: ColorScheme = ColorSchemes.getLightScheme(defaultPrimary),
defaultDarkScheme: ColorScheme = ColorSchemes.getDarkScheme(defaultPrimary),
content: @Composable () -> Unit
)isDarkMode: Boolean to indicate if dark mode is enabled. Default is based on system setting.defaultLightScheme: ColorScheme to use when dynamic color is not available in light mode. Default is generated using
defaultPrimary.defaultDarkScheme: ColorScheme to use when dynamic color is not available in dark mode. Default is generated using
defaultPrimary.content: Composable content to be displayed within the theme.android and windows platforms. On other platforms, the default color scheme will be used.You are free to contribute to this library.
git clone https://github.com/jason3859/dynamic-material-theme.git
cd dynamic-material-themePlease report any bugs or issues on the GitHub Issues page.
build.gradle file:implementation 'io.github.jason3859:dynamic-material-theme:2.0.0'or build.gradle.kts file:
implementation("io.github.jason3859:dynamic-material-theme:2.0.0")DynamicMaterialTheme composable in your app:@Composable
fun MyApp() {
DynamicMaterialTheme {
// Your app content
}
}That's it! You can now enjoy dynamic colors in your app.
@Composable
fun DynamicColorTheme(
isDarkMode: Boolean = isSystemInDarkTheme(),
defaultLightScheme: ColorScheme = ColorSchemes.getLightScheme(defaultPrimary),
defaultDarkScheme: ColorScheme = ColorSchemes.getDarkScheme(defaultPrimary),
content: @Composable () -> Unit
)isDarkMode: Boolean to indicate if dark mode is enabled. Default is based on system setting.defaultLightScheme: ColorScheme to use when dynamic color is not available in light mode. Default is generated using
defaultPrimary.defaultDarkScheme: ColorScheme to use when dynamic color is not available in dark mode. Default is generated using
defaultPrimary.content: Composable content to be displayed within the theme.android and windows platforms. On other platforms, the default color scheme will be used.You are free to contribute to this library.
git clone https://github.com/jason3859/dynamic-material-theme.git
cd dynamic-material-themePlease report any bugs or issues on the GitHub Issues page.