1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! # DeltaE
//!
//! DeltaE is a pure-Rust implementation of the [CIEDE2000
//! algorithm](http://en.wikipedia.org/wiki/Color_difference#CIEDE2000) which
//! serves to quantify the difference between two colors.
//!
//! ## Example:
//!
//! ```
//! extern crate delta_e;
//! extern crate lab;
//!
//! use delta_e::DE2000;
//! use lab::Lab;
//!
//! fn main() {
//!     let color_1 = Lab {
//!         l: 38.972,
//!         a: 58.991,
//!         b: 37.138,
//!     };
//!
//!     let color_2 = Lab {
//!         l: 54.528,
//!         a: 42.416,
//!         b: 54.497,
//!     };
//!
//!     let delta_e = DE2000::new(color_1, color_2);
//!     println!("The color difference is: {}", delta_e);
//! }
//! ```

extern crate lab;

use std::f32;
use lab::Lab;

mod de2000;

pub use de2000::DE2000;