I'm making a theme for my app with jetpack compose and I have this:
@Composable
fun MyTheme(content: @Composable () -> Unit) {
val colors = lightColors(
primary = CustomColors.Custom1,
primaryVariant = CustomColors.Custom2,
onPrimary = Color.White,
background = Color.White,
secondary = CustomColors.Custom2
)
MaterialTheme(colors = colors, content = content)
}
object CustomColors{
val Custom1 = Color(0xEF119335)
val Custom2= Color(0xAA892335)
}
The problem is that when I add secondary = CustomColors.Custom2, I get an error in onPrimary = Color.White. The error is this:
Conflicting 'on' color for a given background error