theme

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTheme = Theme{

	AppBg: lipgloss.Color("#191a1b"),

	Foreground: lipgloss.AdaptiveColor{Light: "#1c2128", Dark: "#e8eaed"},
	Muted:      lipgloss.AdaptiveColor{Light: "#57606a", Dark: "#8b919a"},
	Border:     lipgloss.AdaptiveColor{Light: "#afb8c1", Dark: "#3a3d40"},
	Download:   lipgloss.AdaptiveColor{Light: "#0a7ea4", Dark: "#39d0d8"},
	Upload:     lipgloss.AdaptiveColor{Light: "#bc4c00", Dark: "#ffb454"},
	Latency:    lipgloss.AdaptiveColor{Light: "#0969da", Dark: "#a371f7"},
	Highlight:  lipgloss.AdaptiveColor{Light: "#1a7f37", Dark: "#7ee787"},

	GraphDownBottom: lipgloss.Color("#0b5563"),
	GraphDownTop:    lipgloss.Color("#56e1e8"),

	GraphUpBottom: lipgloss.Color("#8a3b00"),
	GraphUpTop:    lipgloss.Color("#ffc15e"),

	MenuAccentFill: lipgloss.AdaptiveColor{Light: "#e8ecf2", Dark: "#25282c"},

	MenuIdleFill:   lipgloss.Color("#222426"),
	MenuSelectDL:   lipgloss.Color("#1a2e34"),
	MenuSelectUL:   lipgloss.Color("#2e2418"),
	MenuSelectExit: lipgloss.Color("#1a2a1e"),
}

DefaultTheme is a modern dark dashboard palette on a VS-style #191a1b canvas, with a teal (download) / amber (upload) split.

Functions

func PaintScreen

func PaintScreen(t Theme, width, height int, content string) string

PaintScreen fills the terminal with AppBg and centers content on it so the UI never shows the host console's pure-black default.

Types

type Theme

type Theme struct {
	// AppBg is the full-screen terminal canvas color (VS Code / modern CMD grey).
	AppBg lipgloss.Color

	// Foreground is the default text color (AdaptiveColor).
	Foreground lipgloss.AdaptiveColor
	// Muted is for labels / units / secondary text.
	Muted lipgloss.AdaptiveColor
	// Border is the card border color.
	Border lipgloss.AdaptiveColor
	// Download accent (down arrow, download number).
	Download lipgloss.AdaptiveColor
	// Upload accent.
	Upload lipgloss.AdaptiveColor
	// Latency accent.
	Latency lipgloss.AdaptiveColor
	// Highlight is used for peak values / summary emphasis.
	Highlight lipgloss.AdaptiveColor

	// Graph gradient endpoints (concrete colors, so the bars can be shaded
	// per-cell: dark at the base, brighter at the tip).
	GraphDownBottom lipgloss.Color // deep end of the download gradient
	GraphDownTop    lipgloss.Color // bright tip of the download gradient
	GraphUpBottom   lipgloss.Color // deep end of the upload gradient
	GraphUpTop      lipgloss.Color // bright tip of the upload gradient

	// MenuAccentFill is a very faint background used for selected menu cards
	// to give a subtle "filled" modern card feel without being loud.
	MenuAccentFill lipgloss.AdaptiveColor

	// Concrete fills for modern menu buttons (selected state). Adaptive colors
	// alone can leave holes under nested styles; these are solid hex fills.
	MenuIdleFill   lipgloss.Color // unselected panel
	MenuSelectDL   lipgloss.Color // speed-test selected
	MenuSelectUL   lipgloss.Color // bandwidth selected
	MenuSelectExit lipgloss.Color // exit selected
}

Theme holds the reskinnable palette for the whole UI. Text colors use lipgloss.AdaptiveColor so they stay readable on light or dark terminals.

Jump to

Keyboard shortcuts

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