darkerUnsafe

fun darkerUnsafe(tone: Double, ratio: Double): Double
fun darkerUnsafe(tone: Double, ratio: Float): Float

Tone <= tone parameter that ensures ratio. 0 if ratio cannot be achieved.

This method is unsafe because the returned value is guaranteed to be in bounds, but, the in bounds return value may not reach the desired ratio.

Parameters

tone

Tone return value must contrast with.

ratio

Desired contrast ratio of return value and tone parameter.