Delta in deltae - Rust
Description: Trait to determine color difference between various types. As long as the type can be converted to Lab, we can calculate DeltaE.
Keywords: rust, rustlang, rust-lang, Delta

# Trait deltae::Delta
[−][src]

    pub trait Delta: Into<LabValue> {
        fn delta<L: Into<LabValue>>(self, other: L, method: DEMethod) -> DeltaE { ... }
    }

Expand description

Trait to determine color difference between various types. As long as the type can be converted to Lab, we can calculate DeltaE.

## Provided methods

[src]

#### fn delta<L: Into<LabValue>>(self, other: L, method: DEMethod) -> DeltaE

Calculate DeltaE between 2 types

    use deltae::*;

    let lch = LchValue::new(60.3, 89.2, 270.0).unwrap();
    let xyz = XyzValue::new(0.347, 0.912, 0.446).unwrap();
    let de  = lch.delta(xyz, DE1976);
    assert_eq!(de, 180.18364);

## Implementors

[src]

### impl<T: Into<LabValue>> Delta for T