[−][src]Struct delta_e::DE2000
Methods
impl DE2000
[src]
pub fn new(color_1: Lab, color_2: Lab) -> f32
[src]
Returns the difference between two Lab
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); }
pub fn from_rgb(color_1: &[u8; 3], color_2: &[u8; 3]) -> f32
[src]
Returns the difference between two RGB colors.
Example
extern crate delta_e; use delta_e::DE2000; fn main() { let color_1 = [234, 76, 76]; let color_2 = [76, 187, 234]; let delta_e = DE2000::from_rgb(&color_1, &color_2); println!("The color difference is: {}", delta_e); }
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,