theme

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasDarkBackground added in v0.15.0

func HasDarkBackground() bool

HasDarkBackground reports whether the terminal has a dark background.

It only asks the terminal when stdin and stdout are both terminals. Detection works by writing an escape sequence to the output and waiting for the terminal to answer on the input, and nothing answers when stdio is redirected, so asking means waiting on a reply that never comes. On Windows that wait is unbounded: lipgloss opens the console directly rather than giving up, which is why tea used to hang at start-up under a service or a CI runner.

Types

type TeaTheme

type TeaTheme struct{}

TeaTheme implements the huh.Theme interface with tea-cli styling.

func GetTheme

func GetTheme() TeaTheme

GetTheme returns the default theme for huh prompts.

func (TeaTheme) Theme

func (t TeaTheme) Theme(isDark bool) *huh.Styles

Theme implements the huh.Theme interface.

Jump to

Keyboard shortcuts

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