Created
January 9, 2021 11:23
-
-
Save dllewellyn/c9ea780c2000e34cf3ca7ea3ca6e5af6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private val DarkColorPalette = darkColors( | |
| primary = purple200, | |
| primaryVariant = purple700, | |
| secondary = teal200 | |
| ) | |
| private val LightColorPalette = lightColors( | |
| primary = purple500, | |
| primaryVariant = purple700, | |
| secondary = teal200 | |
| /* Other default colors to override | |
| background = Color.White, | |
| surface = Color.White, | |
| onPrimary = Color.White, | |
| onSecondary = Color.Black, | |
| onBackground = Color.Black, | |
| onSurface = Color.Black, | |
| */ | |
| ) | |
| @Composable | |
| fun MyApplicationTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable() () -> Unit) { | |
| val colors = if (darkTheme) { | |
| DarkColorPalette | |
| } else { | |
| LightColorPalette | |
| } | |
| MaterialTheme( | |
| colors = colors, | |
| typography = typography, | |
| shapes = shapes, | |
| content = content | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment