Trait palette::color_difference::ColorDifference

source ·
pub trait ColorDifference {
    type Scalar;

    // Required method
    fn get_color_difference(self, other: Self) -> Self::Scalar;
}
👎Deprecated since 0.7.2: replaced by palette::color_difference::Ciede2000
Expand description

A trait for calculating the color difference between two colors.

Required Associated Types§

source

type Scalar

👎Deprecated since 0.7.2: replaced by palette::color_difference::Ciede2000

The type of the calculated color difference.

Required Methods§

source

fn get_color_difference(self, other: Self) -> Self::Scalar

👎Deprecated since 0.7.2: replaced by palette::color_difference::Ciede2000

Return the difference or distance between two colors.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Wp, T> ColorDifference for Lab<Wp, T>
where T: Real + RealAngle + One + Zero + Powi + Exp + Trigonometry + Abs + Sqrt + Arithmetics + PartialCmp + Clone, T::Mask: LazySelect<T> + BitAnd<Output = T::Mask> + BitOr<Output = T::Mask>, Self: Into<LabColorDiff<T>>,

source§

impl<Wp, T> ColorDifference for Lch<Wp, T>
where T: Real + RealAngle + One + Zero + Trigonometry + Abs + Sqrt + Powi + Exp + Arithmetics + PartialCmp + Clone, T::Mask: LazySelect<T> + BitAnd<Output = T::Mask> + BitOr<Output = T::Mask>, Self: Into<LabColorDiff<T>>,

CIEDE2000 distance metric for color difference.