pub struct Theme {
pub name: &'static str,
pub palette: Palette,
}Expand description
A named built-in palette.
Fields§
§name: &'static str§palette: PaletteImplementations§
Source§impl Theme
impl Theme
pub const DEFAULT: Self
Sourcepub const BTOP: Self
pub const BTOP: Self
btop’s built-in Default theme (src/btop_theme.cpp, Default_theme).
btop’s two-digit hex values are greyscale (#ee -> 238,238,238).
Sourcepub const DRACULA: Self
pub const DRACULA: Self
btop’s dracula.theme: selected_bg/title/hi_fg/gradients are taken from
the file; its CPU gradient is purple->cyan->green, so severity uses
Dracula’s canonical red/yellow/green instead.
Sourcepub const GRUVBOX: Self
pub const GRUVBOX: Self
btop’s gruvbox_dark.theme. btop’s inactive_fg/selected_bg are nearly
the same as main_bg, so the slots mtop uses for readable secondary text
and selection are lifted to gruvbox bg1/fg4.
Sourcepub const KANAGAWA: Self
pub const KANAGAWA: Self
btop’s kanagawa-wave.theme; treemap hues are that theme’s gradient
starts, bright with dark tile labels so the app view matches the theme.
Sourcepub const ANSI16: Self
pub const ANSI16: Self
Only the 16 ANSI colours: usable on limited terminals and in tmux, where RGB is quantised unpredictably.
pub const ALL: [Self; 7]
pub const NAMES: &'static str = "default, btop, dracula, gruvbox-dark, kanagawa-wave, light, ansi16"
Sourcepub fn rendered(self, support: ColorSupport) -> Self
pub fn rendered(self, support: ColorSupport) -> Self
Apply terminal colour-depth conversion while keeping the theme name.
pub fn by_name(name: &str) -> Option<Self>
pub fn next(self) -> Self
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