Skip to main content

ThemeTokens

Trait ThemeTokens 

Source
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§

Source

fn primary(&self) -> Color

Source

fn on_primary(&self) -> Color

Provided Methods§

Source

fn muted(&self) -> Color

Source

fn scrollbar(&self) -> Color

Source

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.

Source

fn surface_alt(&self) -> Color

A quiet, low-contrast surface tone for chip/tag backgrounds. Defaults to a faint neutral wash.

Source

fn border(&self) -> Color

Hairline border/divider tone. Defaults to a faint neutral.

Source

fn success(&self) -> Color

Semantic status colours. Defaults are conventional hues; a theme should override to match its palette.

Source

fn warning(&self) -> Color

Source

fn error(&self) -> Color

Source

fn info(&self) -> Color

Source

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.

Source

fn highlight_med(&self) -> Color

Source

fn highlight_high(&self) -> Color

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§