pub struct Hex(/* private fields */);
Expand description
An Hex representation of the sRGB colour space.
Implementations§
Trait Implementations§
Source§impl Ord for Hex
impl Ord for Hex
Source§impl PartialOrd for Hex
impl PartialOrd for Hex
impl Copy for Hex
impl Eq for Hex
impl StructuralPartialEq for Hex
Auto Trait Implementations§
impl Freeze for Hex
impl RefUnwindSafe for Hex
impl Send for Hex
impl Sync for Hex
impl Unpin for Hex
impl UnwindSafe for Hex
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