pub enum PaletteViolation {
Contrast {
scheme: ColorScheme,
ink: ColorRole,
fill: ColorRole,
ratio: f64,
required: f64,
},
Indistinct {
scheme: ColorScheme,
first: ColorRole,
second: ColorRole,
distance: u32,
},
}Expand description
A pair a palette leaves short, as Palette::check reports it.
Variants§
Contrast
ink on fill measures ratio, under the required bound.
Indistinct
Two colours that have to be told apart are distance apart, summed over the three
eight bit channels.
Trait Implementations§
Source§impl Clone for PaletteViolation
impl Clone for PaletteViolation
impl Copy for PaletteViolation
Source§impl Debug for PaletteViolation
impl Debug for PaletteViolation
Source§impl Display for PaletteViolation
impl Display for PaletteViolation
Source§impl PartialEq for PaletteViolation
impl PartialEq for PaletteViolation
impl StructuralPartialEq for PaletteViolation
Auto Trait Implementations§
impl Freeze for PaletteViolation
impl RefUnwindSafe for PaletteViolation
impl Send for PaletteViolation
impl Sync for PaletteViolation
impl Unpin for PaletteViolation
impl UnsafeUnpin for PaletteViolation
impl UnwindSafe for PaletteViolation
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