#[repr(C)]pub struct Lab {
pub l: f32,
pub a: f32,
pub b: f32,
}
Expand description
Holds CIE LAB values
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§
Source§impl Lab
impl Lab
Sourcepub fn from_pcs_xyz(xyz: Xyz) -> Self
pub fn from_pcs_xyz(xyz: Xyz) -> Self
Converts to CIE Lab from CIE XYZ for PCS encoding
Sourcepub fn to_pcs_xyz(self) -> Xyz
pub fn to_pcs_xyz(self) -> Xyz
Sourcepub fn desaturate_pcs(self) -> Lab
pub fn desaturate_pcs(self) -> Lab
Desaturates out of gamut PCS encoded LAB
Trait Implementations§
Source§impl PartialOrd for Lab
impl PartialOrd for Lab
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