pub struct OkLab {
pub l: f32,
pub a: f32,
pub b: f32,
}Expand description
A color in OKLab perceptual color space.
Fields§
§l: f32Lightness [0, 1].
a: f32Green-red axis.
b: f32Blue-yellow axis.
Implementations§
Source§impl OkLab
impl OkLab
Sourcepub fn from_linear_rgb(c: Color) -> OkLab
pub fn from_linear_rgb(c: Color) -> OkLab
Convert from linear RGB.
Sourcepub fn to_linear_rgb(self) -> Color
pub fn to_linear_rgb(self) -> Color
Convert to linear RGB.
Trait Implementations§
impl Copy for OkLab
impl StructuralPartialEq for OkLab
Auto Trait Implementations§
impl Freeze for OkLab
impl RefUnwindSafe for OkLab
impl Send for OkLab
impl Sync for OkLab
impl Unpin for OkLab
impl UnsafeUnpin for OkLab
impl UnwindSafe for OkLab
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