android-components / / ColorUtils


object ColorUtils (source)


Name Summary
getReadableTextColor fun getReadableTextColor(backgroundColor: Int): Int
Get text color (white or black) that is readable on top of the provided background color.
isDark fun isDark(color: Int): Boolean
Returns true if the color is dark enough that white text should be used on top of it.