#[repr(C)]
pub struct Oklab<ComponentTy> {
pub l: ComponentTy,
pub a: ComponentTy,
pub b: ComponentTy,
}
Expand description
A color in the Oklab color space.
The L (lightness) component. Varies from 0 to 1
The a component, representing green-red chroma difference.
The b component, representing blue-yellow chroma difference.
impl<ComponentTy> AsRef<[ComponentTy; 3]> for Oklab<ComponentTy>
fn as_ref(&self) -> &[ComponentTy; 3]
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
impl<ComponentTy> From<[ComponentTy; 3]> for Oklab<ComponentTy>
fn from([l, a, b]: [ComponentTy; 3]) -> Oklab<ComponentTy>
impl<ComponentTy> Into<[ComponentTy; 3]> for Oklab<ComponentTy>
fn into(self) -> [ComponentTy; 3]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
Restrict a value to a certain interval. Read more
fn eq(&self, other: &Oklab<ComponentTy>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &Oklab<ComponentTy>) -> bool
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<ComponentTy: Eq> Eq for Oklab<ComponentTy>
impl<ComponentTy> Send for Oklab<ComponentTy> where
ComponentTy: Send,
impl<ComponentTy> Sync for Oklab<ComponentTy> where
ComponentTy: Sync,
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.