Skip to main content

Theme

Struct Theme 

Source
pub struct Theme {
Show 13 fields pub background: Color, pub foreground: Color, pub muted: Color, pub muted_text: Color, pub selection_background: Color, pub selection_foreground: Color, pub error: Color, pub success: Color, pub warning: Color, pub accent: Color, pub chrome: Color, pub highlight: Color, pub notice: Color,
}

Fields§

§background: Color§foreground: Color§muted: Color

Structural chrome: borders, unfocused/inactive elements.

§muted_text: Color

Secondary text: hints, footers, “press any key to close”.

§selection_background: Color§selection_foreground: Color§error: Color

Errors, validation failures, last_error.

§success: Color

Booted-simulator dot, confirmation affordances.

§warning: Color

In-flight / transient status messages.

§accent: Color

Popup borders, command-palette chrome, runtime-group headers.

§chrome: Color

Header text, readout numbers, chrome accents.

§highlight: Color

Spare accent (blue slot in the original palette).

§notice: Color

Spare accent (magenta slot in the original palette).

Implementations§

Source§

impl Theme

Source

pub fn from_name(name: ThemeName) -> Self

Source

pub fn default_plus() -> Self

The Default+ colorscheme, values taken verbatim from that repo’s palette.yaml (base + accent).

Source

pub fn ansi() -> Self

The terminal’s own 16-color scheme. Correct on a background whose depth/appearance nothing here has detected, at the cost of not matching Default+ exactly on every terminal — see vigia’s theme.rs for the same reasoning about why an ANSI-named palette is the safe fallback rather than the default.

Source

pub fn tokyo_night() -> Self

Tokyo Night (the “Night” variant), values taken from that project’s canonical Lua palette.

Source

pub fn nord() -> Self

Nord, values taken from the official palette (nord0-nord15). Uses nord8 (“frost”, light blue-cyan) as the accent rather than nord7, matching how most terminal ports pick the brightest frost tone for emphasis.

Source

pub fn dracula() -> Self

Dracula, values taken from the official spec. Dracula has no distinct “blue” — its own ANSI spec maps the blue slot to the purple hex, which this mirrors.

Source

pub fn gruvbox() -> Self

Gruvbox dark, “bright” accent set (gruvbox’s neutral tones are deliberately desaturated/earthy; the bright set reads better as foreground text on its own dark background, which is how most terminal ports use it for ANSI 8-15).

Source

pub fn catppuccin_mocha() -> Self

Catppuccin Mocha, values taken from the official palette.

Source

pub fn solarized_dark() -> Self

Solarized Dark, values taken from the official base16 spec (base03-base3).

Source

pub fn vesper() -> Self

Vesper — an ultra-muted, near-monochromatic palette with warm pastel accents. Values taken from the canonical VS Code theme.

Source

pub fn base(&self) -> Style

Regular body text.

Source

pub fn header(&self) -> Style

The title bar / breadcrumb chrome.

Source

pub fn accent_style(&self) -> Style

Runtime group headers, the command-palette border — anything drawing attention without signaling success/warning/error.

Source

pub fn success(&self) -> Style

A booted simulator’s indicator dot, confirmation affordances.

Source

pub fn warning(&self) -> Style

In-flight/transient status messages, confirm-prompt banners.

Source

pub fn error(&self) -> Style

last_error, validation failures.

Source

pub fn hint(&self) -> Style

Footer key hints, “press any key to close”, the ghost autocomplete suffix, a shutdown simulator’s indicator dot.

Source

pub fn bar(&self) -> Style

The main list’s selected row — the same filled-bar look for every highlighted row across the UI.

Source

pub fn chrome_bar(&self) -> Style

Full-row background wash for header and status bar.

Source

pub fn rule(&self) -> Style

Horizontal rule (hairline) between bars and content.

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 Copy for Theme

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

impl Eq for Theme

Source§

impl PartialEq for Theme

Source§

fn eq(&self, other: &Theme) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Theme

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
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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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
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.