#[repr(C)]pub struct Lab {
pub l: f32,
pub a: f32,
pub b: f32,
}
Expand description
Represents CIELAB color space.
Fields§
§l: f32
l
: lightness component (0 to 100)
a: f32
a
: green (negative) and red (positive) component.
b: f32
b
: 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§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