pub trait ThemeTokens: 'static {
Show 14 methods
// Required methods
fn primary(&self) -> Color;
fn on_primary(&self) -> Color;
// Provided methods
fn muted(&self) -> Color { ... }
fn scrollbar(&self) -> Color { ... }
fn ink(&self) -> Color { ... }
fn surface_alt(&self) -> Color { ... }
fn border(&self) -> Color { ... }
fn success(&self) -> Color { ... }
fn warning(&self) -> Color { ... }
fn error(&self) -> Color { ... }
fn info(&self) -> Color { ... }
fn highlight_low(&self) -> Color { ... }
fn highlight_med(&self) -> Color { ... }
fn highlight_high(&self) -> Color { ... }
}Required Methods§
Provided Methods§
fn muted(&self) -> Color
fn scrollbar(&self) -> Color
Sourcefn ink(&self) -> Color
fn ink(&self) -> Color
Primary text ink for component labels/titles/values. Defaults to a near-black; a theme should override it (e.g. a dark theme returns a light ink) so component text stays legible on its surface.
Sourcefn surface_alt(&self) -> Color
fn surface_alt(&self) -> Color
A quiet, low-contrast surface tone for chip/tag backgrounds. Defaults to a faint neutral wash.
Sourcefn success(&self) -> Color
fn success(&self) -> Color
Semantic status colours. Defaults are conventional hues; a theme should override to match its palette.
fn warning(&self) -> Color
fn error(&self) -> Color
fn info(&self) -> Color
Sourcefn highlight_low(&self) -> Color
fn highlight_low(&self) -> Color
Three progressively stronger highlight/elevation tints for hover, selection, and pressed states. Defaults to faint neutral washes a theme can override with palette-specific tones.
fn highlight_med(&self) -> Color
fn highlight_high(&self) -> Color
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".