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: 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§
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.