Skip to content

Instantly share code, notes, and snippets.

Created Jan 26, 2022
What would you like to do?
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