pvetui supports flexible theming through both terminal emulator color schemes and application-level configuration.
The application uses semantic color constants that automatically adapt to your terminal emulator's color scheme. This approach provides the best user experience by:
- Leveraging existing terminal themes: Use your favorite themes (Dracula, Nord, Solarized, etc.)
- Maintaining semantic meaning: Colors always represent the same concepts regardless of theme
- Minimal configuration: Works out of the box with most terminal emulators
- Consistent experience: Same theme across all terminal applications
You can override any semantic color in your config file. This allows for precise control over the UI appearance, regardless of your terminal's palette.
- By default, semantic colors (Primary, Success, Warning, etc) use your terminal's ANSI palette.
- You can override any color by specifying a hex code (e.g.
#1e1e2e), an ANSI color name (e.g.green,yellow), or a W3C color name (e.g.mediumseagreen). - The special color name
defaultuses your terminal's default color. - Any omitted color key will use the built-in default for that semantic role.
primary,secondary,tertiary,success,warning,error,infobackground,border,selection,header,headertext,footer,footertexttitle,contrast,morecontrast,inversestatusrunning,statusstopped,statuspending,statuserrorusagelow,usagemedium,usagehigh,usagecritical
theme:
colors:
primary: "#e0e0e0"
secondary: "gray"
tertiary: "aqua"
success: "green"
warning: "yellow"
error: "red"
info: "blue"
background: "default"
border: "gray"
selection: "blue"
header: "navy"
headertext: "yellow"
footer: "black"
footertext: "white"
title: "white"
contrast: "blue"
morecontrast: "fuchsia"
inverse: "black"
statusrunning: "green"
statusstopped: "maroon"
statuspending: "yellow"
statuserror: "red"
usagelow: "green"
usagemedium: "yellow"
usagehigh: "red"
usagecritical: "fuchsia"A theme inspired by the Catppuccin Mocha palette:
theme:
colors:
primary: "#cdd6f4" # Text
secondary: "#bac2de" # Subtle text
tertiary: "#a6adc8" # Even more subtle
success: "#a6e3a1" # Green
warning: "#f9e2af" # Yellow
error: "#f38ba8" # Red
info: "#89b4fa" # Blue
background: "#1e1e2e" # Main background
border: "#45475a" # Borders
selection: "#585b70" # Selection highlight
header: "#313244" # Header background
headertext: "#f5e0dc" # Header text
footer: "#313244" # Footer background
footertext: "#cdd6f4" # Footer text
title: "#b4befe" # Titles
contrast: "#313244" # Contrast background
morecontrast: "#181825" # Even more contrast
inverse: "#1e1e2e" # Inverse text
statusrunning: "#a6e3a1" # Green
statusstopped: "#f38ba8" # Red
statuspending: "#f9e2af" # Yellow
statuserror: "#f38ba8" # Red
usagelow: "#a6e3a1" # Green
usagemedium: "#f9e2af" # Yellow
usagehigh: "#fab387" # Peach
usagecritical: "#f38ba8" # Red- Any omitted color key will use the built-in default for that semantic role.
- You can use any valid tcell color name or hex code.
The application uses semantic color constants that maintain consistent meaning across themes:
- Green: Running VMs, online nodes, successful operations
- Red: Stopped VMs, offline nodes, errors
- Yellow: Pending operations, warnings, partial failures
- Blue: Informational elements, descriptions
- Green: Low usage (< 50%)
- Yellow: Medium usage (50-75%)
- Red: High usage (75-90%)
- Red (bright): Critical usage (> 90%)
- Primary: Main text and important information
- Secondary: Supporting text and labels
- Border: Separators and borders
- Selection: Selected items and focus indicators
- Check terminal emulator settings: Ensure your terminal is using the correct color scheme
- Verify configuration: Check your theme color overrides in the config
- Restart application: Some changes require a full restart
- Check TERM variable: Ensure
TERMis set correctly (e.g.,xterm-256color)
- Try different themes: Some themes work better than others
- Adjust terminal colors: Modify your terminal's color scheme
- Use high contrast themes: Themes designed for accessibility often work well
If certain colors appear wrong or are hard to read:
- Check terminal color support: Ensure your terminal supports 256 colors or truecolor
- Verify theme compatibility: Some themes may not work well with TUI applications
- Report issues: Open an issue with your terminal emulator and theme details
For advanced users, you can create custom color schemes by modifying your terminal emulator's color palette. The application will automatically adapt to your custom colors unless you override them in the config.
The application respects standard terminal environment variables:
TERM: Terminal type (should bexterm-256coloror similar)COLORTERM: Terminal color support (e.g.,truecolor)
- Use established themes: Popular themes are well-tested and work reliably
- Test with your workflow: Ensure colors work well with your typical usage patterns
- Consider accessibility: High contrast themes improve readability for many users
- Keep it simple: Avoid overly complex color schemes that may cause issues
If you find a theme that works particularly well or have suggestions for improving the theming system, please:
- Test with multiple terminal emulators
- Document your findings
- Submit a pull request with improvements
- Include screenshots if possible
You can select from several built-in themes by setting theme.name in your config. Available built-in themes:
defaultdraculacatppuccin-mochagruvboxnordrose-pinetokyonightsolarizedkanagawaeverforest
Example:
theme:
name: gruvboxYou can override any color in a built-in theme by specifying it in the colors map:
theme:
name: nord
colors:
error: "#ff0000"
background: "#2e3440"