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

theme

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package theme holds the Catppuccin palette as package-level colors that every component reads directly. Init must run before any component builds a style, so the colors are set once at startup and treated as immutable afterwards.

Index

Constants

This section is empty.

Variables

View Source
var (
	Primary         color.Color
	Accent          color.Color
	Secondary       color.Color
	Text            color.Color
	SelectedBg      color.Color
	MutedBg         color.Color
	SoftMutedBg     color.Color
	ModalBg         color.Color
	AddedLine       color.Color
	DeletedLine     color.Color
	WordDiffAddedBg color.Color
	WordDiffDelBg   color.Color
)

Exported color variables.

View Source
var (
	HeaderStyle            lipgloss.Style
	HunkHeaderStyle        lipgloss.Style
	SectionStyle           lipgloss.Style
	KeyStyle               lipgloss.Style
	FooterStyle            lipgloss.Style
	AdditionStyle          lipgloss.Style
	DeletionStyle          lipgloss.Style
	SelectedFocusedStyle   lipgloss.Style
	SelectedUnfocusedStyle lipgloss.Style
	StatusBarStyle         lipgloss.Style
	BorderStyle            lipgloss.Style
	WordDiffAddedStyle     lipgloss.Style
	WordDiffDeletedStyle   lipgloss.Style
)

Exported style variables.

Functions

func Init

func Init()

Init detects the appropriate theme and initializes all colors and styles.

func PaneStyle

func PaneStyle(width, height int, focused bool) lipgloss.Style

PaneStyle returns a dynamic border style for panes.

Types

type Theme

type Theme struct {
	Primary         color.Color
	Accent          color.Color
	Secondary       color.Color
	Text            color.Color
	SelectedBg      color.Color
	MutedBg         color.Color
	SoftMutedBg     color.Color
	ModalBg         color.Color
	AddedLine       color.Color
	DeletedLine     color.Color
	WordDiffAddedBg color.Color
	WordDiffDelBg   color.Color
}

Theme defines semantic color roles.

func Detect

func Detect() Theme

Detect returns the appropriate theme based on environment.

func Latte

func Latte() Theme

Latte returns Catppuccin Latte (light theme).

func Macchiato

func Macchiato() Theme

Macchiato returns Catppuccin Macchiato (dark theme).

Jump to

Keyboard shortcuts

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