theme

package
v1.37.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package theme provides theme definitions and management for the TUI.

Index

Constants

View Source
const (
	DraculaName         = "dracula"
	DraculaLightName    = "dracula-light"
	NarnaName           = "narna"
	CleanLightName      = "clean-light"
	SolarizedDarkName   = "solarized-dark"
	SolarizedLightName  = "solarized-light"
	GruvboxDarkName     = "gruvbox-dark"
	GruvboxLightName    = "gruvbox-light"
	NordName            = "nord"
	MonokaiName         = "monokai"
	CatppuccinMochaName = "catppuccin-mocha"
	CatppuccinLatteName = "catppuccin-latte"
	RosePineDawnName    = "rose-pine-dawn"
	OneLightName        = "one-light"
	EverforestLightName = "everforest-light"
	EverforestDarkName  = "everforest-dark"
	ModernName          = "modern"
	TokyoNightName      = "tokyo-night"
	OneDarkName         = "one-dark"
	RosePineName        = "rose-pine"
	AyuMirageName       = "ayu-mirage"
	KanagawaName        = "kanagawa"
)

Theme names.

Variables

This section is empty.

Functions

func AvailableThemes

func AvailableThemes() []string

AvailableThemes returns a list of available theme names.

func AvailableThemesWithCustoms added in v1.25.0

func AvailableThemesWithCustoms(customThemes map[string]*CustomThemeData) []string

AvailableThemesWithCustoms returns a list of available theme names including custom themes.

func DefaultDark added in v1.20.0

func DefaultDark() string

DefaultDark returns the default dark theme name.

func DefaultLight added in v1.20.0

func DefaultLight() string

DefaultLight returns the default light theme name.

func DetectBackground added in v1.20.0

func DetectBackground(timeout time.Duration) (string, error)

DetectBackground attempts to detect the terminal background color. It returns the detected theme name (DefaultLight or DefaultDark) and an error if detection fails.

Types

type CustomThemeData added in v1.25.0

type CustomThemeData struct {
	Base      string
	Accent    string
	AccentFg  string
	AccentDim string
	Border    string
	BorderDim string
	MutedFg   string
	TextFg    string
	SuccessFg string
	WarnFg    string
	ErrorFg   string
	Cyan      string
}

CustomThemeData represents custom theme data without importing config package. This avoids circular dependencies.

type Theme

type Theme struct {
	Accent    lipgloss.Color
	AccentFg  lipgloss.Color // Foreground color for text on Accent background
	AccentDim lipgloss.Color
	Border    lipgloss.Color
	BorderDim lipgloss.Color
	MutedFg   lipgloss.Color
	TextFg    lipgloss.Color
	SuccessFg lipgloss.Color
	WarnFg    lipgloss.Color
	ErrorFg   lipgloss.Color
	Cyan      lipgloss.Color
}

Theme defines all colors used in the application UI.

func AyuMirage added in v1.22.0

func AyuMirage() *Theme

AyuMirage returns the Ayu Mirage theme.

func CatppuccinLatte added in v1.20.0

func CatppuccinLatte() *Theme

CatppuccinLatte returns the Catppuccin Latte theme (Light).

func CatppuccinMocha

func CatppuccinMocha() *Theme

CatppuccinMocha returns the Catppuccin Mocha theme.

func CleanLight

func CleanLight() *Theme

CleanLight returns a theme optimized for light terminal backgrounds.

func Dracula

func Dracula() *Theme

Dracula returns the Dracula theme (dark background, vibrant colors).

func DraculaLight added in v1.20.0

func DraculaLight() *Theme

DraculaLight returns the Dracula theme adapted for light backgrounds.

func EverforestDark added in v1.22.0

func EverforestDark() *Theme

EverforestDark returns the Everforest Dark theme (Medium).

func EverforestLight added in v1.20.0

func EverforestLight() *Theme

EverforestLight returns the Everforest Light theme (Medium).

func GetTheme

func GetTheme(name string) *Theme

GetTheme returns a theme by name, or Dracula if not found.

func GetThemeWithCustoms added in v1.25.0

func GetThemeWithCustoms(name string, customThemes map[string]*CustomThemeData) *Theme

GetThemeWithCustoms returns a theme by name, checking built-in themes first, then custom themes. It handles inheritance recursively and merges base themes with overrides.

func GruvboxDark

func GruvboxDark() *Theme

GruvboxDark returns the Gruvbox dark theme.

func GruvboxLight

func GruvboxLight() *Theme

GruvboxLight returns the Gruvbox light theme.

func Kanagawa added in v1.28.0

func Kanagawa() *Theme

Kanagawa returns the Kanagawa theme (Wave).

func MergeTheme added in v1.25.0

func MergeTheme(base *Theme, custom *CustomThemeData) *Theme

MergeTheme merges a base theme with custom theme overrides.

func Modern added in v1.22.0

func Modern() *Theme

Modern returns a sleek, modern dark theme with vibrant accents.

func Monokai

func Monokai() *Theme

Monokai returns the Monokai theme.

func Narna

func Narna() *Theme

Narna returns a balanced dark theme with blue accents.

func Nord

func Nord() *Theme

Nord returns the Nord theme.

func OneDark added in v1.22.0

func OneDark() *Theme

OneDark returns the One Dark theme.

func OneLight added in v1.20.0

func OneLight() *Theme

OneLight returns the Atom One Light theme.

func RosePine added in v1.22.0

func RosePine() *Theme

RosePine returns the Rosé Pine theme (Dark).

func RosePineDawn added in v1.20.0

func RosePineDawn() *Theme

RosePineDawn returns the Rosé Pine Dawn theme (Light).

func SolarizedDark

func SolarizedDark() *Theme

SolarizedDark returns the Solarized dark theme.

func SolarizedLight

func SolarizedLight() *Theme

SolarizedLight returns the Solarized light theme.

func TokyoNight added in v1.22.0

func TokyoNight() *Theme

TokyoNight returns the Tokyo Night theme (Storm).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL