summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/theme
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tui/internal/theme')
-rw-r--r--packages/tui/internal/theme/loader.go4
-rw-r--r--packages/tui/internal/theme/system.go4
-rw-r--r--packages/tui/internal/theme/theme.go2
3 files changed, 10 insertions, 0 deletions
diff --git a/packages/tui/internal/theme/loader.go b/packages/tui/internal/theme/loader.go
index 82c2fcd24..b3d2f0982 100644
--- a/packages/tui/internal/theme/loader.go
+++ b/packages/tui/internal/theme/loader.go
@@ -27,6 +27,10 @@ type LoadedTheme struct {
name string
}
+func (t *LoadedTheme) Name() string {
+ return t.name
+}
+
type colorRef struct {
value any
resolved bool
diff --git a/packages/tui/internal/theme/system.go b/packages/tui/internal/theme/system.go
index 7524bb3f9..8dd48cfec 100644
--- a/packages/tui/internal/theme/system.go
+++ b/packages/tui/internal/theme/system.go
@@ -27,6 +27,10 @@ func NewSystemTheme(terminalBg color.Color, isDark bool) *SystemTheme {
return theme
}
+func (t *SystemTheme) Name() string {
+ return "system"
+}
+
// initializeColors sets up all theme colors
func (t *SystemTheme) initializeColors() {
// Generate gray scale based on terminal background
diff --git a/packages/tui/internal/theme/theme.go b/packages/tui/internal/theme/theme.go
index 9b5b7b915..d5d27a1e1 100644
--- a/packages/tui/internal/theme/theme.go
+++ b/packages/tui/internal/theme/theme.go
@@ -8,6 +8,8 @@ import (
// All colors must be defined as compat.AdaptiveColor to support
// both light and dark terminal backgrounds.
type Theme interface {
+ Name() string
+
// Background colors
Background() compat.AdaptiveColor // Radix 1
BackgroundPanel() compat.AdaptiveColor // Radix 2