Crates.io | delta_e |
lib.rs | delta_e |
version | 0.2.1 |
source | src |
created_at | 2017-05-26 12:12:42.74808 |
updated_at | 2019-06-23 19:05:42.441902 |
description | DeltaE is a pure-Rust implementation of the CIEDE2000 algorithm |
homepage | https://github.com/elliotekj/DeltaE |
repository | https://github.com/elliotekj/DeltaE |
max_upload_size | |
id | 16290 |
size | 14,326 |
DeltaE is a pure-Rust implementation of the CIEDE2000 algorithm which serves to quantify the difference between two colors. It is entirely based on the work of Zachary Schuessler, who has written a Javascript implementation of the algorithm.
If you're using Cargo, just add DeltaE to your Cargo.toml
:
[dependencies]
delta_e = "0.2"
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);
}
DeltaE is released under the MIT LICENSE
.
This crate was written by Elliot Jackson.