pub struct XyzD50 {
pub x: f64,
pub y: f64,
pub z: f64,
pub alpha: f32,
}
Expand description
A colour expressed as X, Y and Z values, expressed in the CIE XYZ tristimulus colour space, with an explicit D50 white point. The components are:
- X - a number between 0.0 and 100.0
- Y - a number between 0.0 and 100.0
- Z - a number between 0.0 and 100.0
- Alpha - a number between 0.0 and 100.0
Fields§
§x: f64
§y: f64
§z: f64
§alpha: f32
Implementations§
Trait Implementations§
impl Copy for XyzD50
impl StructuralPartialEq for XyzD50
Auto Trait Implementations§
impl Freeze for XyzD50
impl RefUnwindSafe for XyzD50
impl Send for XyzD50
impl Sync for XyzD50
impl Unpin for XyzD50
impl UnwindSafe for XyzD50
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