pub struct StatusPalette {
pub light: StatusColors,
pub dark: StatusColors,
}Expand description
The success/warning/info extension a crate::theme::Theme carries via
crate::extensions::ThemeExtensions — recovered with
theme.extension::<StatusPalette>().
crate::theme::Theme::neutral attaches StatusPalette::neutral, so
extension::<StatusPalette>() is always Some on the framework’s own
baseline; an app or design system attaches its own table with
theme.extensions.insert(StatusPalette { .. }) (or
ThemeBuilder::extension) to
override it wholesale.
Fields§
§light: StatusColors§dark: StatusColorsImplementations§
Source§impl StatusPalette
impl StatusPalette
Sourcepub fn colors(&self, brightness: Brightness) -> &StatusColors
pub fn colors(&self, brightness: Brightness) -> &StatusColors
The StatusColors for brightness — mirrors
crate::theme::Theme::scheme’s light/dark selector.
Sourcepub const fn neutral() -> Self
pub const fn neutral() -> Self
The language-free palette crate::theme::Theme::neutral composes.
Success/warning/info are a functional signal, not a design-language
“look” — the same reasoning ColorScheme::neutral_light/_dark use to
keep error real red instead of grayscaling it too — so the neutral
baseline carries a real three-status table rather than going unset.
The values are the module docs’ community-approximate tone
relationships, stated here in full rather than delegated, so this
constructor stands on its own with every design language out of tree.