pub struct Lch {
pub lightness: f64,
pub chroma: f64,
pub hue: f64,
pub alpha: f32,
}
Expand description
A cylindrical colour space representing within the CIE colour space. The components are:
- Lightness / Luminance - a number between 0.0 and 100.0
- Chroma - a number between 0.0 and 150.0
- Hue - a number between 0.0 and 360.0
- Alpha - a number between 0.0 and 100.0
Fields§
§lightness: f64
§chroma: f64
§hue: f64
§alpha: f32
Implementations§
Trait Implementations§
Source§impl<T, U> ColorMixPolar<T, U> for Lch
impl<T, U> ColorMixPolar<T, U> for Lch
fn mix_polar( first: T, second: U, percentage: f64, hue_interpolation: HueInterpolation, ) -> Self
impl Copy for Lch
impl StructuralPartialEq for Lch
Auto Trait Implementations§
impl Freeze for Lch
impl RefUnwindSafe for Lch
impl Send for Lch
impl Sync for Lch
impl Unpin for Lch
impl UnwindSafe for Lch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, T> ColorDistance<T> for C
impl<C, T> ColorDistance<T> for C
Source§impl<C, T> WcagColorContrast<T> for C
impl<C, T> WcagColorContrast<T> for C
Source§fn wcag_contrast_ratio(&self, other: T) -> f64
fn wcag_contrast_ratio(&self, other: T) -> f64
Calculate the contrast ratio between
self
and other
. colors according to WCAG 2.1. Returns a value between
1:1 and 21:1 Read more