pub struct Theme {
pub meta: Meta,
pub ansi: Ansi,
pub palette: Option<Palette>,
pub base16: Option<Base16>,
pub semantic: Semantic,
pub ui: Ui,
}Expand description
A complete TCA theme definition.
Fields§
§meta: MetaTheme metadata. Serde key is theme to match the TOML section name.
ansi: AnsiANSI 16-color definitions.
palette: Option<Palette>Optional named color palette.
base16: Option<Base16>Optional Base16 color scheme.
semantic: SemanticSemantic color roles.
ui: UiUI element colors.
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn resolve(&self, color_ref: &str) -> Option<String>
pub fn resolve(&self, color_ref: &str) -> Option<String>
Resolve a color reference to its #RRGGBB hex value.
Supported reference formats:
- Direct hex:
#ff0000 - ANSI reference:
ansi.red,ansi.bright_black - Palette reference:
palette.neutral.0(0-based index) - Base16 reference:
base16.base08(resolved recursively)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Theme
impl<'de> Deserialize<'de> for Theme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more