Before You Start
All themes should define a consistent color palette across different file formats:
- Hyprland: Shell variables with
$prefix - CSS-based apps:
@define-colorvariables - Ghostty: INI-style
paletteand direct color assignments - Btop: Associative array with
theme[key]=value - Neovim: Lua colorscheme plugin name
Quick Start: Duplicate an Existing Theme
The easiest way to create a custom theme is to start with an existing one:Step-by-Step: Creating a Theme From Scratch
Choose your color palette
Define your base colors using hex codes. Most themes need:Example palette:
Create CSS color files
Create CSS versions for Waybar, Wofi, SwayNC, and Wlogout. All use the same format:Copy this to:
~/.config/waybar/colors/custom/mytheme.css:~/.config/wofi/colors/custom/mytheme.css~/.config/swaync/colors/custom/mytheme.css~/.config/wlogout/colors/custom/mytheme.css
Color Variable Reference
- Standard Variables
- Application-Specific
These variables are used consistently across all theme files:
| Variable | Purpose | Usage |
|---|---|---|
bg0 | Darkest background | Deep shadows, window backgrounds |
bg1 | Main background | Primary surface color |
bg2 | Elevated background | Cards, panels |
bg3 | Higher elevation | Popups, dialogs |
bg4 | Highest elevation | Tooltips, overlays |
fg | Main text | Primary text color |
red | Error/danger | Error messages, warnings |
orange | Warning | Alerts, caution |
yellow | Attention | Highlights, emphasis |
green | Success | Confirmations, positive states |
aqua | Info/accent | Links, info messages |
blue | Primary accent | Borders, focus indicators |
purple | Secondary accent | Keywords, special elements |
pink | Tertiary accent | Decorative elements |
grey0 | Subtle text | Comments, disabled text |
grey1 | Borders | Dividers, borders |
grey2 | Inactive | Inactive elements |
Advanced: Port Existing Themes
If you have colors from another theme (e.g., VS Code, terminal theme), convert them:Theme Testing Checklist
Visual Testing Checklist
Visual Testing Checklist
After applying your theme, verify each component:
- Hyprland: Window borders show correct colors
- Waybar: All modules display with theme colors
- Wofi: Application launcher has themed background/text
- Ghostty: Terminal colors match palette (check with
colortest) - SwayNC: Notifications use theme colors
- Wlogout: Logout menu is themed
- Btop: System monitor colors are readable
- Cava: Audio visualizer gradient looks good
- Neovim: Opens with correct colorscheme
- Wallpaper: Complements the color scheme
Accessibility Testing
Accessibility Testing
Ensure your theme is readable:WCAG AAA guidelines:
- Normal text: 7:1 contrast ratio
- Large text: 4.5:1 contrast ratio
- UI components: 3:1 contrast ratio
Sharing Your Theme
Once you’ve created a theme, consider sharing it:- Create a gist with all theme files
- Submit a PR to the dotfiles repository
- Write installation instructions:
Troubleshooting Custom Themes
Theme doesn't appear in selector
Theme doesn't appear in selector
Check that you added it to
theme-selector:Colors not applying
Colors not applying
Verify all theme files exist:Should show files in all theme directories.
Syntax errors in config files
Syntax errors in config files
Check for:
- Missing semicolons in CSS files
- Typos in color variable names
- Invalid hex codes (must be 6 digits)
- Missing quotes in Btop/Cava configs
Applications not reloading
Applications not reloading
Manually reload affected applications:
Next Steps
Theme Overview
Learn more about how the theme system works
Switch Themes
Master theme switching and keyboard shortcuts