readable Text Color
fun readableTextColor(backgroundColor: Color, lightColor: Color = Color.White, darkColor: Color = Color.Black): Color
Returns an appropriate contrast color (light or dark) based on background color. Similar to iOS UIColor.readableTextColor()
Return
Either lightColor or darkColor based on the background
Parameters
background Color
The background color to check against
light Color
Light color to use if background is dark (default: white)
dark Color
Dark color to use if background is light (default: black)