Skip to main content

Colors

Struct Colors 

Source
pub struct Colors {
    pub accent: Style,
    pub active: Style,
    pub input: Style,
    pub success: Style,
    pub error: Style,
    pub cancel: Style,
    pub dim: Style,
    pub header: Style,
    pub header_plain: Style,
    pub title: Style,
    pub intro_badge: Style,
}
Expand description

Every color slot the prompt theme reads. Override via update_colors.

Fields§

§accent: Style

Small accent glyphs — radio dots (/), checkboxes (/), scroll arrows (), the active prompt diamond ().

§active: Style

Highlight color for the currently active prompt frame — the running down the side of the input line and the closing glyph. Once the prompt is submitted, the frame fades back to dim.

§input: Style

Live user input — typed text inside text/secret/multiline/path/auto, plus the inline cursor block. White by default so what you type looks like what you typed.

§success: Style

Answered prompt glyph () and success markers.

§error: Style

Error glyph (), error frame bar, error message text.

§cancel: Style

Cancel glyph () and cancel banner — used by Ctrl+C handler.

§dim: Style

Frame bars (, , ), placeholder text, idle option labels.

§header: Style

Active question/answer text style — applied to the header line.

§header_plain: Style

Fallback foreground when bold headers are off.

§title: Style

Section title style — used by outro and note. Defaults to a pure bold attribute (no fg override) so it stays visibly bolder than regular text on every terminal that does not collapse bold on bright colors.

§intro_badge: Style

Style for the intro pill — the clack-style badge that frames the session title. Defaults to cyan background, black text, bold. The intro renderer pads the text with one space on each side, so the badge always reads as <title>.

Trait Implementations§

Source§

impl Clone for Colors

Source§

fn clone(&self) -> Colors

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 Colors

Source§

impl Default for Colors

Source§

fn default() -> Self

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

Auto Trait Implementations§

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