palette::color_difference

Trait DeltaE

source
pub trait DeltaE {
    type Scalar;

    // Required method
    fn delta_e(self, other: Self) -> Self::Scalar;
}
Expand description

Calculate the ΔE color difference between two colors.

This represents the original ΔE formula for a color space. It’s often a Euclidean distance for perceptually uniform color spaces and may not always be the best option. See the color_difference module for more details and options.

Required Associated Types§

source

type Scalar

The type for the distance value.

Required Methods§

source

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

Calculate the ΔE color difference metric for self and other, according to the color space’s specification.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> DeltaE for Cam16UcsJab<T>
where Self: EuclideanDistance<Scalar = T>, T: Sqrt,

source§

impl<T> DeltaE for Cam16UcsJmh<T>
where Cam16UcsJab<T>: DeltaE<Scalar = T> + FromColorUnclamped<Self>,

source§

impl<Wp, T> DeltaE for Lab<Wp, T>
where Self: EuclideanDistance<Scalar = T>, T: Sqrt,

source§

impl<Wp, T> DeltaE for Lch<Wp, T>
where Lab<Wp, T>: FromColorUnclamped<Self> + DeltaE<Scalar = T>,