readableOn

fun readableOn(c: Int, backgrounds: List<Int>, ratio: Double = 4.5): Int

c moved towards black or white in 5 % steps until it reaches ratio against every colour in backgrounds (opaque; blend translucent tints with alphaBlend first).