contrastRatio

fun contrastRatio(foreground: Color, background: Color): Double(source)

WCAG 2.x contrast ratio between two opaque colors, in [1, 21].