pub struct A98Rgb {
pub red: f64,
pub green: f64,
pub blue: f64,
pub alpha: f32,
}
Expand description
An RGB colour space with defined chromacities. The components are:
- Red - a number between 0.0 and 1.0
- Blue - a number between 0.0 and 1.0
- Green - a number between 0.0 and 1.0
- Alpha - a number between 0.0 and 100.0
Fields§
§red: f64
§green: f64
§blue: f64
§alpha: f32
Implementations§
Trait Implementations§
impl Copy for A98Rgb
impl StructuralPartialEq for A98Rgb
Auto Trait Implementations§
impl Freeze for A98Rgb
impl RefUnwindSafe for A98Rgb
impl Send for A98Rgb
impl Sync for A98Rgb
impl Unpin for A98Rgb
impl UnwindSafe for A98Rgb
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