Skip to main content

readable

Function readable 

Source
pub fn readable(colour: Color, background: Color) -> Color
Expand description

colour, moved just far enough towards near-white or near-black, whichever stands out from background, for text in it to reach TEXT_CONTRAST. A colour that already reads is left as it is.