pub struct Theme { /* private fields */ }Implementations§
Source§impl Theme
impl Theme
pub fn from_env() -> Self
Sourcepub fn with_kind_from_env(kind: ThemeKind) -> Self
pub fn with_kind_from_env(kind: ThemeKind) -> Self
Apply a theme kind chosen by the TUI config file while still honoring
NO_COLOR/TERM=dumb and detected terminal color capability.
pub fn from_environment( requested: &str, no_color: bool, term: &str, colorterm: &str, ) -> Self
pub fn from_kind_environment( requested_kind: ThemeKind, no_color: bool, term: &str, colorterm: &str, ) -> Self
pub const fn new(kind: ThemeKind, colors: ColorLevel) -> Self
pub const fn key(&self) -> ThemeKey
Sourcepub fn surface(&self) -> Style
pub fn surface(&self) -> Style
Base surface painted beneath the bakery-palette UI. Mono and high-contrast themes keep the terminal background.
Sourcepub fn panel(&self) -> Style
pub fn panel(&self) -> Style
Panels (overlays, pickers, the focused input box, the bottom bar) share the one cream surface — borders, not a second fill, delineate them. Foreground is left alone so content keeps whatever the surface painted.
Sourcepub fn panel_border(&self) -> Style
pub fn panel_border(&self) -> Style
Walnut border for pane chrome (conversation, tree, pickers), dark enough to keep the frame visible on the cream surface.
Sourcepub fn selected(&self) -> Style
pub fn selected(&self) -> Style
Keyboard-selected row in pickers, palettes, and the session tree: a toasted background with bold espresso text. Reverse video carries the selection where no color is available.
Sourcepub fn selected_overlay(&self) -> Style
pub fn selected_overlay(&self) -> Style
Selection surface without foreground or emphasis, for rows whose spans retain their own visual hierarchy.
Sourcepub fn text_selection(&self) -> Style
pub fn text_selection(&self) -> Style
Mouse-drag text selection: a deeper crust wash than the keyboard
selected row and never bold, so the two selection kinds never read
alike. Where subtle color exists (ANSI-256, true color) only the
background is set — patched cells keep their foregrounds, so
selected code keeps its syntax colors. ANSI-16 and high-contrast
targets are the one documented exception: their text is always a
bright color, which a light-cyan wash would swallow, so the pair is
pinned to black-on-light-cyan. Cruder targets add bold on top of
reverse video to stay distinct.
Sourcepub fn hover(&self) -> Style
pub fn hover(&self) -> Style
Hover affordance patched over interactive text cells: a quiet glaze background — one calm step deeper than the cream surface, never a reddish tint. Cruder targets (mono, ANSI-16, high contrast) underline as well, so the affordance never relies on a subtle background shift alone. Existing foreground colors are preserved by the patch.
Sourcepub fn hover_fill(&self) -> Style
pub fn hover_fill(&self) -> Style
Background-only hover fill for approval buttons and other glyph cells where an underline would not read.
Sourcepub fn code_background(&self) -> Option<Color>
pub fn code_background(&self) -> Option<Color>
Subtle parchment band behind fenced code blocks. The bakery themes paint one; mono and high-contrast keep blocks flat.
Sourcepub fn terminal_background(&self) -> Option<Color>
pub fn terminal_background(&self) -> Option<Color>
Muted grey band for shell output: neutral beside the warm code tint, so command output never reads as highlighted source.
Sourcepub fn tool_title_background(&self) -> Option<Color>
pub fn tool_title_background(&self) -> Option<Color>
Background of an expanded tool’s title block (header plus the rest of its primary argument): a grey one step deeper than the output band. Sixteen-colour terminals have no grey ladder, so the block stays untinted there rather than collide with the hover fill.
Sourcepub fn block_hover(&self) -> Style
pub fn block_hover(&self) -> Style
Interactive block hover preserves foregrounds and never underlines.
Sourcepub fn decision(&self, tone: DecisionTone, active: bool) -> Style
pub fn decision(&self, tone: DecisionTone, active: bool) -> Style
One approval decision button. active (hover) fills the button with
a decision-tinted background; the border/label color and the button
glyphs carry the meaning, never color alone.
pub fn body(&self) -> Style
pub fn muted(&self) -> Style
Sourcepub fn muted_text(&self) -> Style
pub fn muted_text(&self) -> Style
The body text colour one step quieter, for rows that summarise hidden content: collapsed tool calls and thinking.
pub fn user(&self) -> Style
pub fn assistant(&self) -> Style
pub fn thinking(&self) -> Style
Sourcepub fn tool(&self) -> Style
pub fn tool(&self) -> Style
Tool rows sit under the bold agent header, so colour alone carries them; colourless themes keep bold as the only cue left.
pub fn tool_running(&self) -> Style
pub fn tool_success(&self) -> Style
pub fn tool_failure(&self) -> Style
Sourcepub fn warning(&self) -> Style
pub fn warning(&self) -> Style
Warning style — visually distinct from error styling (never red).
pub fn error(&self) -> Style
pub fn internal(&self) -> Style
pub fn heading(&self) -> Style
pub fn link(&self) -> Style
Sourcepub fn inline_code(&self) -> Style
pub fn inline_code(&self) -> Style
Inline code in assistant Markdown: a distinct warm terracotta foreground, never a background in the default theme — the source backticks stay visible, and the bold modifier carries the distinction in mono terminals. High contrast keeps its inverse-video chip. Inline code. Bakery palettes set it in a muted body-text colour on the code-block parchment, in regular weight, which is marker enough that the renderer drops the backticks; other themes keep bold text and the backticks. Inline code in the bakery palettes is text, not a chip: a close cousin of the body colour (cocoa beside espresso) with no tint, so it never breaks a line into padded blocks. Sixteen colours have no such near shade and keep the body colour on the code tint; colourless and high-contrast themes keep a weight or chip cue.
Sourcepub fn inline_code_is_coloured(&self) -> bool
pub fn inline_code_is_coloured(&self) -> bool
Whether inline code’s own text colour marks it, so it needs neither a chip nor backticks.
Sourcepub fn inline_code_cap(&self) -> Option<Style>
pub fn inline_code_cap(&self) -> Option<Style>
The half-block caps (▐ before, ▌ after) that widen a tinted
inline-code chip by half a cell on each side: foreground in the chip’s
background colour over the surrounding surface. None where inline
code has no tint.
pub fn code_border(&self) -> Style
pub fn code_gutter(&self) -> Style
pub fn diff_added(&self) -> Style
pub fn diff_removed(&self) -> Style
pub fn diff_hunk(&self) -> Style
pub fn quote(&self) -> Style
pub fn scrollbar_thumb(&self) -> Style
pub fn input_border(&self, focused: bool) -> Style
pub fn quantize_rgb(&self, red: u8, green: u8, blue: u8) -> Option<Color>
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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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