#[non_exhaustive]pub struct Colors {
pub background: Color,
pub surface: Color,
pub primary: Color,
pub primary_variant: Color,
pub secondary: Color,
pub secondary_variant: Color,
pub error: Color,
pub on_background: Color,
pub on_surface: Color,
pub on_primary: Color,
pub on_secondary: Color,
pub on_error: Color,
}Expand description
A set of Colors for theming UI elements.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.background: ColorBackground color, used to clear the screen each frame and appears behind scrollable content.
surface: ColorSurface color, used to render surfaces of widgets, cards, sheets, and menus.
primary: ColorPrimary color displayed most often across widgets.
primary_variant: ColorPrimary variant color.
secondary: ColorSecondary color for accents and distinguishing content, optional.
secondary_variant: ColorSecondary variant color, optional.
error: ColorError highlighting of text and outlines.
on_background: ColorText and icon color when rendered over the background color.
on_surface: ColorText and icon color when rendered over the surface color.
on_primary: ColorText and icon color when rendered over a primary color.
on_secondary: ColorText and icon color when rendered over a secondary color.
on_error: ColorText and icon color when rendered over the error color.
Implementations
Return the on background overlay color.
Return the on surface overlay color.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Colors
impl UnwindSafe for Colors
Blanket Implementations
Mutably borrows from an owned value. Read more