pub struct Theme {
pub primary: Color,
pub secondary: Color,
pub success: Color,
pub warning: Color,
pub error: Color,
pub info: Color,
pub muted: Color,
pub custom: HashMap<String, Color>,
}Expand description
A theme defines colors and styles for different semantic elements.
Fields§
§primary: ColorPrimary color
secondary: ColorSecondary color
success: ColorSuccess/positive color
warning: ColorWarning color
error: ColorError/danger color
info: ColorInfo color
muted: ColorMuted/dim color
custom: HashMap<String, Color>Custom named colors
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn default_theme() -> Self
pub fn default_theme() -> Self
Get the default theme (similar to Rich’s default).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnwindSafe for Theme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more