pub struct AdaptiveBrand {
pub light: Color,
pub dark: Color,
pub light_adjusted: bool,
pub dark_adjusted: bool,
pub light_clears_aa: bool,
pub dark_clears_aa: bool,
}Expand description
The light- and dark-mode variants of one brand color, plus a flag
for each side indicating whether the engine had to adjust it and
whether that adjustment actually cleared AA. *_adjusted says
“we tried”; *_clears_aa says “we succeeded”.
Fields§
§light: ColorVariant to use on light backgrounds.
dark: ColorVariant to use on dark backgrounds.
light_adjusted: boolTrue when the light variant was nudged from the input.
dark_adjusted: boolTrue when the dark variant was nudged from the input.
light_clears_aa: boolTrue when the (possibly adjusted) light variant clears
AA_NON_TEXT against LIGHT_BG. False means the loop ran
out of headroom — the caller should know the token is still
failing rather than silently trust the report.
dark_clears_aa: boolSame as Self::light_clears_aa for the dark background.
Trait Implementations§
Source§impl Clone for AdaptiveBrand
impl Clone for AdaptiveBrand
Source§fn clone(&self) -> AdaptiveBrand
fn clone(&self) -> AdaptiveBrand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdaptiveBrand
impl Debug for AdaptiveBrand
impl Copy for AdaptiveBrand
Auto Trait Implementations§
impl Freeze for AdaptiveBrand
impl RefUnwindSafe for AdaptiveBrand
impl Send for AdaptiveBrand
impl Sync for AdaptiveBrand
impl Unpin for AdaptiveBrand
impl UnsafeUnpin for AdaptiveBrand
impl UnwindSafe for AdaptiveBrand
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