Help us shape the future of Go! Take the 2026 Go Developer Survey

themes

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetThemeNames

func GetThemeNames() []string

GetThemeNames returns a list of available theme names

func Initialize

func Initialize()

Initialize registers theme constructors and sets the default theme

func RegisterTheme

func RegisterTheme(name string, constructor func() Theme)

RegisterTheme registers a theme constructor

func SetTheme

func SetTheme(name string) error

SetTheme changes the current theme by name

Types

type CatppuccinFrappeTheme

type CatppuccinFrappeTheme struct {
	// contains filtered or unexported fields
}

CatppuccinFrappeTheme implements the Theme interface with Catppuccin Frappé colors

func (*CatppuccinFrappeTheme) Colors

func (t *CatppuccinFrappeTheme) Colors() ColorPalette

Colors returns the color palette

func (*CatppuccinFrappeTheme) Name

func (t *CatppuccinFrappeTheme) Name() string

Name returns the theme name

type CatppuccinLatteTheme

type CatppuccinLatteTheme struct {
	// contains filtered or unexported fields
}

CatppuccinLatteTheme implements the Theme interface with Catppuccin Latte colors

func (*CatppuccinLatteTheme) Colors

func (t *CatppuccinLatteTheme) Colors() ColorPalette

Colors returns the color palette

func (*CatppuccinLatteTheme) Name

func (t *CatppuccinLatteTheme) Name() string

Name returns the theme name

type CatppuccinMacchiatoTheme

type CatppuccinMacchiatoTheme struct {
	// contains filtered or unexported fields
}

CatppuccinMacchiatoTheme implements the Theme interface with Catppuccin Macchiato colors

func (*CatppuccinMacchiatoTheme) Colors

Colors returns the color palette

func (*CatppuccinMacchiatoTheme) Name

func (t *CatppuccinMacchiatoTheme) Name() string

Name returns the theme name

type CatppuccinMochaTheme

type CatppuccinMochaTheme struct {
	// contains filtered or unexported fields
}

CatppuccinMochaTheme implements the Theme interface with Catppuccin Mocha colors

func (*CatppuccinMochaTheme) Colors

func (t *CatppuccinMochaTheme) Colors() ColorPalette

Colors returns the color palette

func (*CatppuccinMochaTheme) Name

func (t *CatppuccinMochaTheme) Name() string

Name returns the theme name

type ColorPalette

type ColorPalette struct {
	// Base colors
	Primary   lipgloss.Color
	Secondary lipgloss.Color
	Tertiary  lipgloss.Color

	// UI element colors
	Background lipgloss.Color
	Foreground lipgloss.Color
	Border     lipgloss.Color

	// Semantic colors
	Success lipgloss.Color
	Error   lipgloss.Color
	Warning lipgloss.Color
	Info    lipgloss.Color

	// File/directory colors
	Directory  lipgloss.Color
	File       lipgloss.Color
	Selected   lipgloss.Color
	Deselected lipgloss.Color

	// Text colors
	Text      lipgloss.Color
	Muted     lipgloss.Color
	Highlight lipgloss.Color
}

ColorPalette defines the colors used throughout the application

type DraculaTheme

type DraculaTheme struct {
	// contains filtered or unexported fields
}

DraculaTheme implements the Theme interface with Dracula colors

func (*DraculaTheme) Colors

func (t *DraculaTheme) Colors() ColorPalette

Colors returns the color palette

func (*DraculaTheme) Name

func (t *DraculaTheme) Name() string

Name returns the theme name

type NordTheme

type NordTheme struct {
	// contains filtered or unexported fields
}

NordTheme implements the Theme interface with Nord colors

func (*NordTheme) Colors

func (t *NordTheme) Colors() ColorPalette

Colors returns the color palette

func (*NordTheme) Name

func (t *NordTheme) Name() string

Name returns the theme name

type Theme

type Theme interface {
	// Colors returns the color palette for the theme
	Colors() ColorPalette
	// Name returns the theme's name
	Name() string
}

Theme interface provides colors for the UI

var (
	// CurrentTheme holds the active theme
	CurrentTheme Theme
)

func NewCatppuccinFrappeTheme

func NewCatppuccinFrappeTheme() Theme

NewCatppuccinFrappeTheme creates a new instance of the Catppuccin Frappé theme

func NewCatppuccinLatteTheme

func NewCatppuccinLatteTheme() Theme

NewCatppuccinLatteTheme creates a new instance of the Catppuccin Latte theme

func NewCatppuccinMacchiatoTheme

func NewCatppuccinMacchiatoTheme() Theme

NewCatppuccinMacchiatoTheme creates a new instance of the Catppuccin Macchiato theme

func NewCatppuccinMochaTheme

func NewCatppuccinMochaTheme() Theme

NewCatppuccinMochaTheme creates a new instance of the Catppuccin Mocha theme

func NewDraculaTheme

func NewDraculaTheme() Theme

NewDraculaTheme creates a new instance of the Dracula theme

func NewNordTheme

func NewNordTheme() Theme

NewNordTheme creates a new instance of the Nord theme

Jump to

Keyboard shortcuts

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