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

theme

package
v0.7.221 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package theme is the shared palette and pane drawing for chunk's full-screen TUIs (chunk watch and the planning screen), computed for the terminal's current background.

Index

Constants

This section is empty.

Variables

View Source
var (
	Yellow = lipgloss.Color("#FFF700")
	Navy   = lipgloss.Color("#2E3C52")
	Green  = lipgloss.Color("#00DB73")
)

Chunk brand colours. The accent is navy on a light terminal, where yellow would vanish, and yellow on a dark one.

Functions

func EdgeSegment

func EdgeSegment(line func(string) string, title string, n int) string

EdgeSegment is n cells of a frame edge drawn with line, with title set into it as in "─ runs ─────" and cut to leave at least one cell of edge after it.

func Help

func Help(st Styles, width int) help.Model

Help is a help view styled with st, fitting width.

Types

type Styles

type Styles struct {
	Dim      lipgloss.Style
	Emphasis lipgloss.Style
	Success  lipgloss.Style
	Warning  lipgloss.Style
	Running  lipgloss.Style
	Teal     lipgloss.Style
	Error    lipgloss.Style
	Muted    lipgloss.Style
	VDim     lipgloss.Style
	// Chip is the base of a coloured label; the caller sets its background.
	Chip lipgloss.Style
	// Accent is filled with the brand colour, for the one primary action a
	// screen offers (e.g. sending a draft to the factory), so it reads as a
	// button next to the dimmed, bracketed hints for everything else.
	Accent lipgloss.Style
	// Field is the faint ground of a text input, so where to type is easy to
	// find on the terminal's own background.
	Field lipgloss.Style
}

Styles holds lipgloss styles computed for the current terminal background, shared by the full-screen TUIs.

func New

func New(dark bool) Styles

New returns the styles for a terminal with a dark background, or a light one.

func (Styles) Pane

func (s Styles) Pane(focused bool, w, h int, title, body string) string

Pane draws body in a rounded box w cells wide and h tall, border included, with title set into its top edge. The focused pane's border is the accent and the others' are quiet. body must already fit inside the border.

Jump to

Keyboard shortcuts

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