cosmic::cosmic_theme::palette::color_difference

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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 as HasBoolMask>::Mask: LazySelect<T> + BitAnd<Output = <T as HasBoolMask>::Mask> + BitOr<Output = <T as HasBoolMask>::Mask>, Lab<Wp, T>: 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 as HasBoolMask>::Mask: LazySelect<T> + BitAnd<Output = <T as HasBoolMask>::Mask> + BitOr<Output = <T as HasBoolMask>::Mask>, Lch<Wp, T>: Into<LabColorDiff<T>>,

CIEDE2000 distance metric for color difference.