Theme
TheTheme enum represents a built-in theme for your Iced application. Themes control the visual appearance of all widgets through color palettes and extended color sets.
Theme Enum
Theme Methods
Getting Palettes
Palette of the theme with six core colors (background, text, primary, success, warning, danger).
Extended palette with derived color variations for all color categories.
Creating Custom Themes
Palette. The extended palette is automatically generated.
Base Trait
TheBase trait defines the core functionality every theme must provide:
Mode
Style
Using Themes
Setting the Default Theme
Dynamic Theme Switching
Environment Variable
You can set the default theme using theICED_THEME environment variable:
Widget Styling
Themes work together with widget styling functions. Most widgets accept astyle method that takes a closure:
button::primarybutton::successcontainer::rounded_boxtext::danger
Examples
Iterating All Built-in Themes
Accessing Theme Colors
Creating a Theme Picker
See Also
- Built-in Themes - All available theme variants
- Custom Themes - Creating your own themes
- Palette - Color palette structure
- Widget Styling - Styling individual widgets
