Function

calculateContentColor

Calculates the preferred content color for backgroundColor.

calculateContentColor

Source set: Android
public fun calculateContentColor(backgroundColor: Color): Color

Calculates the preferred content color for backgroundColor. This will return either Color.White or Color.Black, depending on the luminance of the background color.

Last updated: