Themes
ox-tui supports built-in color palettes and custom TOML theme files loaded with Theme::from_toml or Theme::load_file. Built-in palettes dogfood the same TOML schema and live in crates/ox-tui/themes/.
Selecting a Theme
Section titled “Selecting a Theme”Set the top-level theme key in config.toml to a built-in palette name, a bare themes/<name>.toml stem (from the configuration root or a package_roots directory), or the path to a custom TOML theme file:
# Built-in palettetheme = "catppuccin-mocha"
# Custom theme file# theme = "/path/to/custom-theme.toml"Built-in Palettes
Section titled “Built-in Palettes”| Name | Description | Source |
|---|---|---|
catppuccin-mocha |
Catppuccin Mocha dark true-color palette (default) | catppuccin-mocha.toml |
catppuccin-latte |
Catppuccin Latte light true-color palette | catppuccin-latte.toml |
material-dark |
Google Material 3 Dark true-color palette | material-dark.toml |
ansi |
Dark / light-safe 16-color terminal ANSI palette (uses terminal fg / bg) | ansi.toml |
Previews
Section titled “Previews”catppuccin-mocha
Section titled “catppuccin-mocha”catppuccin-latte
Section titled “catppuccin-latte”material-dark
Section titled “material-dark”Writing a Custom Theme
Section titled “Writing a Custom Theme”Start from an optional inherits parent theme, which defaults to catppuccin-mocha, and override only the semantic slots or [tui] sections you want to change. Unknown keys are rejected.
inherits accepts a built-in theme name or a relative / absolute path to another TOML theme file, inheriting both colors and [tui] defaults with cycle detection.
See TUI for how theme [tui] defaults interact with presets and user overrides.
inherits = "catppuccin-mocha"
[message.user_prefix]fg = "#74c7ec"bold = true
[chrome.status_bar]fg = "white"bg = "#313244"
[tui.input]border = "rounded"Style Fields
Section titled “Style Fields”Each slot table accepts any subset of these fields:
| Field | Type | Default | Description |
|---|---|---|---|
fg |
string |
None | Foreground color (#RRGGBB hex or ANSI color name) |
bg |
string |
None | Background color (#RRGGBB hex or ANSI color name) |
bold |
boolean |
None | Add (true) or remove (false) bold modifier |
italic |
boolean |
None | Add (true) or remove (false) italic modifier |
dim |
boolean |
None | Add (true) or remove (false) dim modifier |
underlined |
boolean |
None | Add (true) or remove (false) underline modifier |
Color Values
Section titled “Color Values”- True-color hex: 6-digit
#RRGGBB. - Named ANSI:
black,red,green,yellow,blue,magenta,cyan,gray/grey,dark-gray(dark_gray,darkgray),light-red(light_red),light-green(light_green),light-yellow(light_yellow),light-blue(light_blue),light-magenta(light_magenta),light-cyan(light_cyan),white,reset.
Semantic Slots
Section titled “Semantic Slots”Slots are grouped into 6 two-level TOML tables: [chrome.*], [message.*], [tool.*], [markdown.*], [code.*], and [overlay.*].
| Slot | Usage |
|---|---|
chrome.border |
Unfocused pane and card borders |
chrome.border_focused |
Active input or overlay borders |
chrome.muted |
Placeholders and secondary metadata |
chrome.status_bar |
Status bar foreground and background |
message.user_prefix |
Prefix label for user prompts |
message.user_body |
Body text for user prompts |
message.thinking_prefix |
Prefix label for model reasoning |
message.thinking_body |
Body text for model reasoning |
message.assistant_prefix |
Prefix label for assistant responses |
message.assistant_body |
Body text for assistant responses |
message.system |
System notices and harness errors |
tool.running |
Running tool status label |
tool.ok |
Successful tool status label |
tool.error |
Failed tool status label |
tool.body |
Indented tool arguments and output |
markdown.heading |
Markdown heading lines |
markdown.bullet |
Markdown list bullet markers |
markdown.inline_code |
Markdown inline code spans |
markdown.link |
Markdown links, bare URLs, and issue references |
markdown.code_block |
Markdown fenced code block body |
markdown.code_fence |
Markdown fenced code block borders and language |
markdown.blockquote |
Markdown blockquote prefix and text |
markdown.rule |
Markdown thematic break horizontal rule |
markdown.table_border |
Markdown table box-drawing borders |
markdown.table_header |
Markdown table header cells |
code.keyword |
Syntax-highlighted keywords in code blocks |
code.string |
Syntax-highlighted strings in code blocks |
code.comment |
Syntax-highlighted comments in code blocks |
code.number |
Syntax-highlighted numbers in code blocks |
code.type |
Syntax-highlighted types in code blocks |
overlay.title |
Overlay title and prompt text |
overlay.selected |
Highlighted overlay list or confirmation item |
overlay.item |
Unselected overlay list or confirmation item |
See crates/ox-tui/themes/catppuccin-mocha.toml for a complete example setting every semantic slot.
Bundled [tui] Defaults
Section titled “Bundled [tui] Defaults”Themes can optionally bundle default [tui] overrides. See TUI for the supported subsections, fields, and [tui] preset options.