pub struct Theme {Show 23 fields
pub name: String,
pub accent: Color,
pub accent_dim: Color,
pub bg: Color,
pub bg_highlight: Color,
pub bg_panel: Color,
pub fg: Color,
pub fg_dim: Color,
pub fg_muted: Color,
pub border: Color,
pub border_focused: Color,
pub tab_active_bg: Color,
pub tab_active_fg: Color,
pub error: Color,
pub warning: Color,
pub success: Color,
pub info: Color,
pub keyword: Color,
pub function: Color,
pub type_: Color,
pub string: Color,
pub number: Color,
pub comment: Color,
}Expand description
Color palette for the UI
Fields§
§name: String§accent: Color§accent_dim: Color§bg: Color§bg_highlight: Color§bg_panel: Color§fg: Color§fg_dim: Color§fg_muted: Color§border: Color§border_focused: Color§tab_active_bg: ColorActive tab background (darker tone so white text is always visible)
tab_active_fg: ColorActive tab text (white for consistent contrast across themes)
error: Color§warning: Color§success: Color§info: Color§keyword: Color§function: Color§type_: Color§string: Color§number: Color§comment: ColorImplementations§
Source§impl Theme
impl Theme
pub fn default_dark() -> Self
pub fn nord() -> Self
Sourcepub fn catppuccin_mocha() -> Self
pub fn catppuccin_mocha() -> Self
Catppuccin Mocha theme
pub fn from_kind(kind: ThemeKind) -> Self
pub fn from_name(name: &str) -> Self
pub fn kind(&self) -> ThemeKind
pub fn style_accent(&self) -> Style
pub fn style_accent_bold(&self) -> Style
pub fn style_normal(&self) -> Style
pub fn style_dim(&self) -> Style
pub fn style_muted(&self) -> Style
pub fn style_highlight(&self) -> Style
Sourcepub fn style_selected(&self) -> Style
pub fn style_selected(&self) -> Style
Style for selected list rows. Uses explicit fg so text stays readable on the highlight background.
pub fn style_border(&self) -> Style
Sourcepub fn style_tab_active(&self) -> Style
pub fn style_tab_active(&self) -> Style
Active tab: button-style highlight (e.g. lavender bg, light text).
Sourcepub fn style_border_glow(&self) -> Style
pub fn style_border_glow(&self) -> Style
Subtle accent-tinted border for the outer frame (soft glow effect).
pub fn style_border_focused(&self) -> Style
pub fn style_error(&self) -> Style
pub fn style_warning(&self) -> Style
pub fn style_success(&self) -> Style
pub fn style_info(&self) -> Style
pub fn style_keyword(&self) -> Style
pub fn style_function(&self) -> Style
pub fn style_type(&self) -> Style
pub fn style_string(&self) -> Style
pub fn style_number(&self) -> Style
pub fn style_comment(&self) -> Style
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more