pub struct Theme { /* private fields */ }Expand description
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn by_name(name: &str) -> Option<Theme>
pub fn by_name(name: &str) -> Option<Theme>
Look up a built-in theme by name (case-insensitive, kebab-case or snake_case).
Sourcepub fn dark() -> Theme
pub fn dark() -> Theme
The default dark theme.
Calibrated for modern dark terminal backgrounds with restrained, warm developer syntax highlighting.
Sourcepub fn monochrome() -> Theme
pub fn monochrome() -> Theme
A monochrome theme using clear terminal effects (bold, dim, italic, underline) without colors.
Sourcepub fn solarized_dark() -> Theme
pub fn solarized_dark() -> Theme
The Solarized Dark theme.
Sourcepub fn solarized_light() -> Theme
pub fn solarized_light() -> Theme
The Solarized Light theme.
Sourcepub fn catppuccin_mocha() -> Theme
pub fn catppuccin_mocha() -> Theme
The Catppuccin Mocha theme (popular soft pastel comfort palette).
Sourcepub fn catppuccin() -> Theme
pub fn catppuccin() -> Theme
Alias for Theme::catppuccin_mocha().
Sourcepub fn tokyo_night() -> Theme
pub fn tokyo_night() -> Theme
The Tokyo Night theme (neon city night aesthetic).
Sourcepub const fn with(self, role: StyleRole, style: Style) -> Theme
pub const fn with(self, role: StyleRole, style: Style) -> Theme
Set the style for a specific semantic role.
Sourcepub const fn style(&self, role: StyleRole) -> Style
pub const fn style(&self, role: StyleRole) -> Style
Get the style for a specific semantic role.
Sourcepub fn adapt_to(self, level: ColorLevel) -> Theme
pub fn adapt_to(self, level: ColorLevel) -> Theme
Adapt theme colors to match the target color capability level.
Sourcepub fn to_ansi256(self) -> Theme
pub fn to_ansi256(self) -> Theme
Convert all colors in the theme to 256-color palette.
Sourcepub fn to_monochrome(self) -> Theme
pub fn to_monochrome(self) -> Theme
Convert the theme to monochrome (preserve effects like bold/dim, strip colors).