pub struct LabColor {
pub l: f64,
pub a: f64,
pub b: f64,
pub color_space: LabColorSpace,
}Expand description
Color value in Lab color space
Fields§
§l: f64L* component (lightness, 0 to 100)
a: f64a* component (green-red axis)
b: f64b* component (blue-yellow axis)
color_space: LabColorSpaceAssociated color space
Implementations§
Source§impl LabColor
impl LabColor
Sourcepub fn with_default(l: f64, a: f64, b: f64) -> Self
pub fn with_default(l: f64, a: f64, b: f64) -> Self
Create Lab color with default D50 color space
Sourcepub fn color_space_array(&self) -> Vec<Object>
pub fn color_space_array(&self) -> Vec<Object>
Get the color space array for PDF
Sourcepub fn delta_e(&self, other: &LabColor) -> f64
pub fn delta_e(&self, other: &LabColor) -> f64
Calculate color difference from another Lab color
Sourcepub fn delta_e_2000(&self, other: &LabColor) -> f64
pub fn delta_e_2000(&self, other: &LabColor) -> f64
Calculate perceptual color difference (Delta E 2000)
Trait Implementations§
impl StructuralPartialEq for LabColor
Auto Trait Implementations§
impl Freeze for LabColor
impl RefUnwindSafe for LabColor
impl Send for LabColor
impl Sync for LabColor
impl Unpin for LabColor
impl UnwindSafe for LabColor
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