pub struct ContrastCheck {
pub name: String,
pub foreground: Color,
pub background: Color,
pub ratio: f32,
pub passes_aa: bool,
pub passes_aaa: bool,
}Expand description
Result of a WCAG contrast check.
Fields§
§name: StringName of the color pair
foreground: ColorForeground color
background: ColorBackground color
ratio: f32Calculated contrast ratio
passes_aa: boolPasses WCAG AA for normal text (4.5:1)
passes_aaa: boolPasses WCAG AAA for normal text (7:1)
Trait Implementations§
Source§impl Clone for ContrastCheck
impl Clone for ContrastCheck
Source§fn clone(&self) -> ContrastCheck
fn clone(&self) -> ContrastCheck
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContrastCheck
impl RefUnwindSafe for ContrastCheck
impl Send for ContrastCheck
impl Sync for ContrastCheck
impl Unpin for ContrastCheck
impl UnwindSafe for ContrastCheck
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more