#[repr(C)]pub struct Lab {
pub l: f32,
pub a: f32,
pub b: f32,
}Expand description
Represents CIELAB color space.
Fields§
§l: f32l: lightness component (0 to 100)
a: f32a: green (negative) and red (positive) component.
b: f32b: blue (negative) and yellow (positive) component
Implementations§
Trait Implementations§
source§impl AddAssign<f32> for Lab
impl AddAssign<f32> for Lab
source§fn add_assign(&mut self, rhs: f32)
fn add_assign(&mut self, rhs: f32)
Performs the
+= operation. Read moresource§impl AddAssign for Lab
impl AddAssign for Lab
source§fn add_assign(&mut self, rhs: Lab)
fn add_assign(&mut self, rhs: Lab)
Performs the
+= operation. Read moresource§impl DivAssign<f32> for Lab
impl DivAssign<f32> for Lab
source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/= operation. Read moresource§impl DivAssign for Lab
impl DivAssign for Lab
source§fn div_assign(&mut self, rhs: Lab)
fn div_assign(&mut self, rhs: Lab)
Performs the
/= operation. Read moresource§impl EuclideanDistance for Lab
impl EuclideanDistance for Lab
fn euclidean_distance(&self, other: Lab) -> f32
source§impl MulAssign<f32> for Lab
impl MulAssign<f32> for Lab
source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*= operation. Read moresource§impl MulAssign for Lab
impl MulAssign for Lab
source§fn mul_assign(&mut self, rhs: Lab)
fn mul_assign(&mut self, rhs: Lab)
Performs the
*= operation. Read moresource§impl PartialOrd for Lab
impl PartialOrd for Lab
source§impl SubAssign<f32> for Lab
impl SubAssign<f32> for Lab
source§fn sub_assign(&mut self, rhs: f32)
fn sub_assign(&mut self, rhs: f32)
Performs the
-= operation. Read moresource§impl SubAssign for Lab
impl SubAssign for Lab
source§fn sub_assign(&mut self, rhs: Lab)
fn sub_assign(&mut self, rhs: Lab)
Performs the
-= operation. Read moresource§impl TaxicabDistance for Lab
impl TaxicabDistance for Lab
fn taxicab_distance(&self, other: Self) -> f32
impl Copy for Lab
impl StructuralPartialEq for Lab
Auto Trait Implementations§
impl Freeze for Lab
impl RefUnwindSafe for Lab
impl Send for Lab
impl Sync for Lab
impl Unpin for Lab
impl UnwindSafe for Lab
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more