I'm trying to modify the contrast of ripple color of the background of a Row when I click on it. So far this is how I modified the color of the background.
object GreenRippleTheme : RippleTheme {
@Composable
override fun defaultColor(): Color = FigmaPrimaryGreenDark
@Composable
override fun rippleAlpha(): RippleAlpha = RippleTheme.defaultRippleAlpha(
Color.White,
lightTheme = !isSystemInDarkTheme()
)
}
Inside my theme:
CompositionLocalProvider(
LocalBaseScr provides colors,
) {
MaterialTheme(
colors = colors.material,
content = content,
)
}
The composable:
@Composable
fun ActionWidget() {
CompositionLocalProvider(LocalRippleTheme provides GreenRippleTheme) {
Row(
modifier = Modifier
.height(100.dp)
.fillMaxWidth()
.clickable(enabled = true,
onClick = {})
)
{}
}
}
The background color on click changed, but how to deal with the contrast of the color?