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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user