feat: Add Dracula and Everforest color themes, set Everforest as default

- Add DraculaTheme with official Dracula color palette
- Add EverforestTheme with natural Everforest dark color scheme
- Set Everforest as default theme (was 'default')
- Update README with theming documentation and THEME env var usage
- Build verified successfully
This commit is contained in:
Calmcacil
2026-01-12 19:10:46 +01:00
parent 26120b8bc2
commit 85f2e521c9
3 changed files with 70 additions and 6 deletions

View File

@@ -79,11 +79,39 @@ var LightTheme = &Theme{
},
}
// DraculaTheme is the popular Dracula dark color scheme
var DraculaTheme = &Theme{
Name: "dracula",
Scheme: ColorScheme{
Primary: lipgloss.Color("#BD93F9"), // Purple
Success: lipgloss.Color("#50FA7B"), // Green
Warning: lipgloss.Color("#FFB86C"), // Orange
Error: lipgloss.Color("#FF5555"), // Red
Muted: lipgloss.Color("#6272A4"), // Light purple-gray
Background: lipgloss.Color("#282A36"), // Dark background
},
}
// EverforestTheme is the natural Everforest dark color scheme
var EverforestTheme = &Theme{
Name: "everforest",
Scheme: ColorScheme{
Primary: lipgloss.Color("#7fbbb3"), // Blue
Success: lipgloss.Color("#a7c080"), // Green
Warning: lipgloss.Color("#dbbc7f"), // Yellow
Error: lipgloss.Color("#e67e80"), // Red
Muted: lipgloss.Color("#414b50"), // Gray
Background: lipgloss.Color("#272e33"), // Dark background
},
}
// ThemeRegistry holds all available themes
var ThemeRegistry = map[string]*Theme{
"default": DefaultTheme,
"dark": DarkTheme,
"light": LightTheme,
"default": DefaultTheme,
"dark": DarkTheme,
"light": LightTheme,
"dracula": DraculaTheme,
"everforest": EverforestTheme,
}
// GetTheme loads the theme from config or environment variable
@@ -93,15 +121,15 @@ func GetTheme() (*Theme, error) {
// Try to get theme from environment variable first
themeName := os.Getenv("THEME")
if themeName == "" {
themeName = "default"
themeName = "everforest"
}
// Look up the theme in the registry
if theme, ok := ThemeRegistry[themeName]; ok {
currentTheme = theme
} else {
// If theme not found, use default
currentTheme = DefaultTheme
// If theme not found, use everforest as default
currentTheme = EverforestTheme
}
// Apply the theme to initialize styles