Skip to main content

Theme

Struct Theme 

Source
pub struct Theme { /* private fields */ }

Implementations§

Source§

impl Theme

Source

pub fn from_env() -> Self

Source

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.

Source

pub fn from_environment( requested: &str, no_color: bool, term: &str, colorterm: &str, ) -> Self

Source

pub fn from_kind_environment( requested_kind: ThemeKind, no_color: bool, term: &str, colorterm: &str, ) -> Self

Source

pub const fn new(kind: ThemeKind, colors: ColorLevel) -> Self

Source

pub const fn key(&self) -> ThemeKey

Source

pub fn surface(&self) -> Style

Base surface painted beneath the bakery-palette UI. Mono and high-contrast themes keep the terminal background.

Source

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.

Source

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.

Source

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.

Source

pub fn selected_overlay(&self) -> Style

Selection surface without foreground or emphasis, for rows whose spans retain their own visual hierarchy.

Source

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.

Source

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.

Source

pub fn hover_fill(&self) -> Style

Background-only hover fill for approval buttons and other glyph cells where an underline would not read.

Source

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.

Source

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.

Source

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.

Source

pub fn block_hover(&self) -> Style

Interactive block hover preserves foregrounds and never underlines.

Source

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.

Source

pub fn body(&self) -> Style

Source

pub fn muted(&self) -> Style

Source

pub fn muted_text(&self) -> Style

The body text colour one step quieter, for rows that summarise hidden content: collapsed tool calls and thinking.

Source

pub fn user(&self) -> Style

Source

pub fn assistant(&self) -> Style

Source

pub fn thinking(&self) -> Style

Source

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.

Source

pub fn tool_running(&self) -> Style

Source

pub fn tool_success(&self) -> Style

Source

pub fn tool_failure(&self) -> Style

Source

pub fn warning(&self) -> Style

Warning style — visually distinct from error styling (never red).

Source

pub fn error(&self) -> Style

Source

pub fn internal(&self) -> Style

Source

pub fn heading(&self) -> Style

Source

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.

Source

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.

Source

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.

Source

pub fn code_border(&self) -> Style

Source

pub fn code_gutter(&self) -> Style

Source

pub fn diff_added(&self) -> Style

Source

pub fn diff_removed(&self) -> Style

Source

pub fn diff_hunk(&self) -> Style

Source

pub fn quote(&self) -> Style

Source

pub fn scrollbar_thumb(&self) -> Style

Source

pub fn input_border(&self, focused: bool) -> Style

Source

pub fn quantize_rgb(&self, red: u8, green: u8, blue: u8) -> Option<Color>

Trait Implementations§

Source§

impl Clone for Theme

Source§

fn clone(&self) -> Theme

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Theme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Theme

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more