Skip to main content

Crate tca_types

Crate tca_types 

Source
Expand description

Core types for Terminal Colors Architecture (TCA)

This crate provides the foundational type definitions used across the TCA ecosystem for theme representation and manipulation.

Structs§

Ansi
ANSI 16-color definitions (TOML section [ansi]).
Base16
Base16 color definitions (TOML section [base16]).
Meta
Theme metadata (TOML section [theme]).
Palette
Color palette with named hue ramps (TOML section [palette]).
Semantic
Semantic color roles (TOML section [semantic]).
TcaConfig
TCA configuration file.
Theme
A complete TCA theme definition.
ThemeCursor
A cycling cursor over a list of themes of type T.
Ui
UI element colors (TOML section [ui] with nested sub-tables).
UiBg
Background colors (nested under [ui.bg]).
UiBorder
Border colors (nested under [ui.border]).
UiCursor
Cursor colors (nested under [ui.cursor]).
UiFg
Foreground colors (nested under [ui.fg]).
UiSelection
Selection colors (nested under [ui.selection]).

Enums§

BuiltinTheme
Enum of built in themes.
HexColorError
Errors that can occur when parsing a hex color string.

Functions§

all_from_dir
Get all themes from a given directory.
all_themes
Get a map of all available themes.
all_user_themes
Get all local user themes.
hex_to_rgb
Convert a hex color string to RGB components.
load_theme_file
Finds a theme file by exact path or theme name and reads it into a String.
user_themes_path
Get the themes directory path, creating it if it does not exist.