Trait palette::ColorDifference
source · [−]pub trait ColorDifference {
type Scalar: FloatComponent;
fn get_color_difference(&self, other: &Self) -> Self::Scalar;
}
Expand description
A trait for calculating the color difference between two colors.
Required Associated Types
type Scalar: FloatComponent
type Scalar: FloatComponent
The type of the calculated color difference
Required Methods
fn get_color_difference(&self, other: &Self) -> Self::Scalar
fn get_color_difference(&self, other: &Self) -> Self::Scalar
Return the difference or distance between two colors
Implementors
sourceimpl<Wp, T> ColorDifference for Lab<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
impl<Wp, T> ColorDifference for Lab<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
type Scalar = T
sourceimpl<Wp, T> ColorDifference for Lch<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
impl<Wp, T> ColorDifference for Lch<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
CIEDE2000 distance metric for color difference.