Documentation
¶
Overview ¶
Package ui holds cchp's one restrained palette. It uses the terminal's own ANSI colors, so it follows light and dark themes, and output written through Writer drops color for NO_COLOR, dumb terminals and pipes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Accent = lipgloss.Color("4") Good = lipgloss.Color("2") Bad = lipgloss.Color("1") Caution = lipgloss.Color("3") )
var ( Title = lipgloss.NewStyle().Bold(true) Brand = lipgloss.NewStyle().Bold(true).Foreground(Accent) Muted = lipgloss.NewStyle().Faint(true) Key = lipgloss.NewStyle().Bold(true) Success = lipgloss.NewStyle().Foreground(Good) Failure = lipgloss.NewStyle().Foreground(Bad).Bold(true) Warning = lipgloss.NewStyle().Foreground(Caution) Selected = lipgloss.NewStyle().Foreground(Accent).Bold(true) Box = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).BorderForeground(Accent).Padding(0, 1) AlertBox = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).BorderForeground(Caution).Padding(0, 1) )
Functions ¶
func Sentence ¶
Sentence starts text with a capital letter for people to read. The program name keeps its lower case.
func TerminalWidth ¶
TerminalWidth is the width of the terminal behind f, or 0 when f is not one.
Types ¶
This section is empty.