Expand description
A color in the CIE Lab color space.
Fields
l: f32
The lightness component.
a: f32
The a component.
b: f32
The b component.
alpha: f32
The alpha component.
Implementations
Trait Implementations
sourceimpl ColorGamut for LAB
impl ColorGamut for LAB
sourceimpl From<FloatColor> for LAB
impl From<FloatColor> for LAB
sourcefn from(color: FloatColor) -> LAB
fn from(color: FloatColor) -> LAB
Converts to this type from the input type.
sourceimpl From<LAB> for SRGBLinear
impl From<LAB> for SRGBLinear
sourcefn from(t: LAB) -> SRGBLinear
fn from(t: LAB) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<PredefinedColor> for LAB
impl From<PredefinedColor> for LAB
sourcefn from(color: PredefinedColor) -> LAB
fn from(color: PredefinedColor) -> LAB
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for LAB
impl From<SRGBLinear> for LAB
sourcefn from(t: SRGBLinear) -> LAB
fn from(t: SRGBLinear) -> LAB
Converts to this type from the input type.
sourceimpl Interpolate for LAB
impl Interpolate for LAB
sourcefn adjust_powerless_components(&mut self)
fn adjust_powerless_components(&mut self)
Adjusts components that are powerless to be NaN.
sourcefn premultiply(&mut self)
fn premultiply(&mut self)
Premultiplies the color by its alpha value.
sourcefn unpremultiply(&mut self, alpha_multiplier: f32)
fn unpremultiply(&mut self, alpha_multiplier: f32)
Un-premultiplies the color by the given alpha multiplier.
sourcefn fill_missing_components(&mut self, other: &Self)
fn fill_missing_components(&mut self, other: &Self)
Fills missing components (represented as NaN) to match the other color to interpolate with.
sourcefn interpolate(&self, p1: f32, other: &Self, p2: f32) -> Self
fn interpolate(&self, p1: f32, other: &Self, p2: f32) -> Self
Interpolates the color with another using the given amounts of each.
sourcefn adjust_hue(&mut self, _: &mut Self, _: HueInterpolationMethod)
fn adjust_hue(&mut self, _: &mut Self, _: HueInterpolationMethod)
Adjusts the color hue according to the given hue interpolation method.
sourceimpl PartialEq<LAB> for LAB
impl PartialEq<LAB> for LAB
impl Copy for LAB
impl StructuralPartialEq for LAB
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> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer