Themes
Customize Ralph TUI's appearance with custom color themes.
Custom Themes
Ralph TUI supports custom color themes. Load a bundled theme by name or provide a path to a custom JSON file:
Bundled Themes
Five themes are included with Ralph TUI:
| Theme | Description |
|---|---|
bright | Vibrant colors with purple backgrounds |
catppuccin | Soothing pastel colors (Mocha variant) |
dracula | Classic dark theme with vibrant accents |
high-contrast | High contrast with near-black backgrounds |
solarized-light | Light theme based on Solarized palette |
The default theme is Tokyo Night when no --theme option is provided.
Theme File Structure
Theme files define colors for different UI elements. See assets/themes/high-contrast.json for a complete example.
Color Categories
| Category | Purpose |
|---|---|
bg | Background colors (primary, secondary, tertiary, highlight) |
fg | Foreground/text colors (primary, secondary, muted, dim) |
status | Status indicator colors (success, warning, error, info) |
task | Task state colors (done, active, actionable, pending, blocked, error, closed) |
accent | Accent colors for highlights and emphasis |
border | Border colors (normal, active, muted) |
Partial Themes
You don't need to specify every color. Missing values fall back to the default Tokyo Night theme:
This creates a theme that only overrides the primary background and foreground colors.
Color Format
All colors must be valid hex color codes:
- 6-digit hex:
#ff0000(red) - 3-digit hex:
#f00(red, shorthand)
Invalid hex colors will cause the theme to fail validation. Ralph TUI validates all colors at load time and reports any errors.
Creating a Custom Theme
-
Copy an existing theme as a starting point:
Bash -
Edit the colors to your preference
-
Load your theme:
Bash
Start with a partial theme if you only want to change a few colors. The default Tokyo Night theme provides sensible defaults for any colors you don't specify.