Struct pix_engine::gui::theme::Colors
source · #[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: Color
Background color, used to clear the screen each frame and appears behind scrollable content.
surface: Color
Surface color, used to render surfaces of widgets, cards, sheets, and menus.
primary: Color
Primary color displayed most often across widgets.
primary_variant: Color
Primary variant color.
secondary: Color
Secondary color for accents and distinguishing content, optional.
secondary_variant: Color
Secondary variant color, optional.
error: Color
Error highlighting of text and outlines.
on_background: Color
Text and icon color when rendered over the background color.
on_surface: Color
Text and icon color when rendered over the surface color.
on_primary: Color
Text and icon color when rendered over a primary color.
on_secondary: Color
Text and icon color when rendered over a secondary color.
on_error: Color
Text and icon color when rendered over the error color.
Implementations§
source§impl Colors
impl Colors
sourcepub fn on_background(&self) -> Color
pub fn on_background(&self) -> Color
Return the on background overlay color.
sourcepub fn on_surface(&self) -> Color
pub fn on_surface(&self) -> Color
Return the on surface overlay color.