palette

Function contrast_ratio

source
pub fn contrast_ratio<T>(luma1: T, luma2: T) -> T
where T: Real + Arithmetics + PartialCmp, T::Mask: LazySelect<T>,
👎Deprecated since 0.7.2: replaced by LinLuma::relative_contrast, via Wcag21RelativeContrast
Expand description

Calculate the ratio between two luma values.