-
-
Save Peddro/7d1a1b72a5614221b4499badc031c180 to your computer and use it in GitHub Desktop.
This file contains 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
@Composable | |
@ReadOnlyComposable | |
fun defaultContentColorFor(backgroundColor: Color): Color = | |
H19Theme.colors.contentColorFor(backgroundColor).takeOrElse { LocalContentColor.current } | |
private fun H19Colors.contentColorFor(backgroundColor: Color): Color { | |
return when (backgroundColor) { | |
primary -> onPrimary | |
background -> onBackground | |
else -> Color.Unspecified | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment