Expand description
Theme system with semantic color slots. Theme system with semantic color slots.
A Theme provides semantic color slots that map to actual colors. This enables consistent styling and easy theme switching (light/dark mode, custom themes).
§Example
use ftui_style::theme::{Theme, AdaptiveColor};
use ftui_style::color::Color;
// Use the default dark theme
let theme = Theme::default();
let text_color = theme.text.resolve(true); // true = dark mode
// Create a custom theme
let custom = Theme::builder()
.text(Color::rgb(200, 200, 200))
.background(Color::rgb(20, 20, 20))
.build();Modules§
- themes
- Built-in theme presets.
Structs§
- Resolved
Theme - A theme with all colors resolved to fixed values.
- Shared
Resolved Theme - Wait-free shared resolved theme for concurrent read/write.
- Theme
- A theme with semantic color slots.
- Theme
Builder - Builder for creating custom themes.
Enums§
- Adaptive
Color - An adaptive color that can change based on light/dark mode.