pub struct Theme {
pub ok: Color,
pub error: Color,
pub warning: Color,
pub new: Color,
pub modified: Color,
pub secret: Color,
pub selected: Color,
pub dim: Color,
pub accent: Color,
}Expand description
Semantic palette.
Field names describe the role a colour plays, not the colour
itself. The Self::dark constructor wires a default dark-theme
palette tuned for legibility on a typical terminal background.
§Examples
use evault_tui::Theme;
let theme = Theme::dark();
let _header_style = theme.header();Fields§
§ok: ColorSuccess — green.
error: ColorFailure / validation error — red.
warning: ColorSoft warning (missing link, unset secret) — yellow.
new: ColorHighlight for rows added during this session — cyan.
modified: ColorHighlight for rows modified during this session — magenta.
secret: ColorIndicator colour for masked / secret values — dark gray.
selected: ColorBackground colour applied to the selected row.
dim: ColorSecondary text — timestamps, hints, metadata.
accent: ColorAccent — titles, separators, key chord hints.
Implementations§
Source§impl Theme
impl Theme
Sourcepub const fn selected_row(&self) -> Style
pub const fn selected_row(&self) -> Style
Style applied to the currently selected table row.
Sourcepub const fn secret_cell(&self) -> Style
pub const fn secret_cell(&self) -> Style
Style for a value that is hidden because it is a secret.
Sourcepub const fn error_toast(&self) -> Style
pub const fn error_toast(&self) -> Style
Style for an error toast (red foreground on default background).
Sourcepub const fn info_toast(&self) -> Style
pub const fn info_toast(&self) -> Style
Style for an informational toast.
Trait Implementations§
impl Copy for Theme
impl Eq for Theme
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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