Files
owlen/themes/README.md
vikingowl 55e6b0583d feat(ui): add configurable role label display and syntax highlighting support
- Introduce `RoleLabelDisplay` enum (inline, above, none) and integrate it into UI rendering and message formatting.
- Replace `show_role_labels` boolean with `role_label_mode` across config, formatter, session, and TUI components.
- Add `syntax_highlighting` boolean to UI settings with default `false` and support in message rendering.
- Update configuration schema version to 1.3.0 and provide deserialization handling for legacy boolean values.
- Extend theme definitions with code block styling fields (background, border, text, keyword, string, comment) and default values in `Theme`.
- Adjust related modules (`formatting.rs`, `ui.rs`, `session.rs`, `chat_app.rs`) to use the new settings and theme fields.
2025-10-12 16:44:53 +02:00

99 lines
3.3 KiB
Markdown

# OWLEN Built-in Themes
This directory contains the built-in themes that are embedded into the OWLEN binary.
## Available Themes
- **default_dark** - High-contrast dark theme (default)
- **default_light** - Clean light theme
- **grayscale-high-contrast** - Monochrome palette tuned for color-blind accessibility
- **gruvbox** - Popular retro color scheme with warm tones
- **dracula** - Dark theme with vibrant purple and cyan colors
- **solarized** - Precision colors for optimal readability
- **midnight-ocean** - Deep blue oceanic theme
- **rose-pine** - Soho vibes with muted pastels
- **monokai** - Classic code editor theme
- **material-dark** - Google's Material Design dark variant
- **material-light** - Google's Material Design light variant
## Theme File Format
Each theme is defined in TOML format with the following structure:
```toml
name = "theme-name"
# Text colors
text = "#ffffff" # Main text color
placeholder = "#808080" # Placeholder/muted text
# Background colors
background = "#000000" # Main background
command_bar_background = "#111111"
status_background = "#111111"
# Border colors
focused_panel_border = "#ff00ff" # Active panel border
unfocused_panel_border = "#800080" # Inactive panel border
# Message role colors
user_message_role = "#00ffff" # User messages
assistant_message_role = "#ffff00" # Assistant messages
thinking_panel_title = "#ff00ff" # Thinking panel title
# Mode indicator colors (status bar)
mode_normal = "#00ffff"
mode_editing = "#00ff00"
mode_model_selection = "#ffff00"
mode_provider_selection = "#00ffff"
mode_help = "#ff00ff"
mode_visual = "#ff0080"
mode_command = "#ffff00"
# Selection and cursor
selection_bg = "#0000ff" # Selection background
selection_fg = "#ffffff" # Selection foreground
cursor = "#ff0080" # Cursor color
# Code block styling
code_block_background = "#111111"
code_block_border = "#ff00ff"
code_block_text = "#ffffff"
code_block_keyword = "#ffff00"
code_block_string = "#00ff00"
code_block_comment = "#808080"
# Status colors
error = "#ff0000" # Error messages
info = "#00ff00" # Info/success messages
```
## Color Format
Colors can be specified in two formats:
1. **Hex RGB**: `#rrggbb` (e.g., `#ff0000` for red, `#ff8800` for orange)
2. **Named colors** (case-insensitive):
- **Basic**: `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`
- **Gray variants**: `gray`, `grey`, `darkgray`, `darkgrey`
- **Light variants**: `lightred`, `lightgreen`, `lightyellow`, `lightblue`, `lightmagenta`, `lightcyan`
**Note**: For colors not in the named list (like orange, purple, brown), use hex RGB format.
OWLEN will display an error message on startup if a custom theme has invalid colors.
## Creating Custom Themes
To create your own theme:
1. Copy one of these files to `~/.config/owlen/themes/`
2. Rename and modify the colors
3. Set `theme = "your-theme-name"` in `~/.config/owlen/config.toml`
4. Or use `:theme your-theme-name` in OWLEN to switch
## Embedding in Binary
These theme files are embedded into the OWLEN binary at compile time using Rust's `include_str!()` macro. This ensures they're always available, even if the files are deleted from disk.
Custom themes placed in `~/.config/owlen/themes/` will override built-in themes with the same name.