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 ¶
Click to show internal directories.
Click to hide internal directories.