warning

fun warning(owner: String, foregroundName: String, foregroundRgb: Int, backgroundName: String, backgroundRgb: Int, requirement: OtpContrastRequirement): String?(source)

Returns a warning that explains which pair fails and why, or null when the pair meets requirement. The library logs it and still uses the colors, so brand colors remain usable.