[−][src]Struct pigmnts::color::LAB
Fields
l: f32
a: f32
b: f32
Methods
impl LAB
[src]
pub fn from_rgb(r: u8, g: u8, b: u8) -> Self
[src]
Helper function to create a LAB color from RGB values without creating intermediate struct
pub fn chroma(&self) -> f32
[src]
Calculates the chroma of the color
pub fn nearest(&self, colors: &Vec<LAB>) -> (usize, f32)
[src]
Finds the index and distance from nearest color from a group of colors
pub fn distance(&self, color: &LAB) -> f32
[src]
Calculates Delta E(1994) between two colors
pub fn to_xyz(&self) -> (f32, f32, f32)
[src]
Trait Implementations
impl Clone for LAB
[src]
impl Display for LAB
[src]
impl<'_> From<&'_ LAB> for RGB
[src]
impl<'_> From<&'_ LAB> for HSL
[src]
impl<'_> From<&'_ RGB> for LAB
[src]
impl PartialEq<LAB> for LAB
[src]
Auto Trait Implementations
impl RefUnwindSafe for LAB
impl Send for LAB
impl Sync for LAB
impl Unpin for LAB
impl UnwindSafe for LAB
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,