pub trait HyAb {
type Scalar;
// Required method
fn hybrid_distance(self, other: Self) -> Self::Scalar;
}
Expand description
Calculate a combination of Euclidean and Manhattan/City-block distance between two colors.
The HyAB distance was suggested as an alternative to CIEDE2000 for large color differences in Distance metrics for very large color differences (in Color Res Appl. 2019;1–16) by Saeedeh Abasi, Mohammad Amani Tehran and Mark D. Fairchild. It’s originally meant for CIE L*a*b* (CIELAB), but this trait is also implemented for other color spaces that have similar semantics, although without the same quality guarantees.
The hybrid distance is the sum of the absolute lightness difference and the distance on the chroma plane. This makes the lightness and chroma differences more independent from each other, which is meant to correspond more to how humans perceive the two qualities.
Required Associated Types§
Required Methods§
sourcefn hybrid_distance(self, other: Self) -> Self::Scalar
fn hybrid_distance(self, other: Self) -> Self::Scalar
Calculate the hybrid distance between self
and other
.
This returns the sum of the absolute lightness difference and the distance on the chroma plane.