Struct empfindung::cie00::DE2000

source ·
pub struct DE2000;
👎Deprecated: Use cie00::diff() or cie00::diff_rgb() instead

Implementations§

👎Deprecated: Use cie00::diff() instead

Returns the colour difference between two Lab colours.

Example
use empfindung::DE2000;

let colour_1 = lab::Lab { l: 38.972, a: 58.991, b: 37.138 };
let colour_2 = lab::Lab { l: 54.528, a: 42.416, b: 54.497 };

let delta_e = DE2000::new(colour_1, colour_2);
println!("The colour difference is: {}", delta_e);
assert_eq!(20.553642, delta_e);
👎Deprecated: Use cie00::diff_rgb() instead

Returns the colour difference between two RGB colours.

Example
use empfindung::DE2000;

let colour_1 = [234, 76, 76];
let colour_2 = [76, 187, 234];

let delta_e = DE2000::from_rgb(&colour_1, &colour_2);
println!("The colour difference is: {}", delta_e);
assert_eq!(58.90164, delta_e);

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.