Documentation
¶
Overview ¶
Package styles provides minimal ANSI styling helpers for CLI output.
This package defines colors and text styles used throughout Ralph's console output. It uses raw ANSI escape codes (truecolor / 24-bit) to avoid pulling in a styling library.
Colors are chosen automatically based on the terminal background. Detection uses the COLORFGBG environment variable (set by most terminals). When that is absent the dark-background palette is used as the default.
Index ¶
Constants ¶
const RalphFox = `` /* 1159-byte string literal not displayed */
RalphFox is ASCII art of Ralph the blue fox shown at CLI startup.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Color ¶ added in v0.2.0
type Color string
Color is a truecolor (24-bit) ANSI SGR fragment, e.g. "38;2;255;28;240".
type Style ¶ added in v0.2.0
type Style struct {
// contains filtered or unexported fields
}
Style applies a sequence of ANSI SGR codes around a string.
var ( // SubTitleStyle for primary text. SubTitleStyle Style // InfoStyle for informational messages. InfoStyle Style // SuccessStyle for success messages. SuccessStyle Style // WarningStyle for warning messages. WarningStyle Style // ErrorStyle for error messages. ErrorStyle Style )
Message styles
var ( // TitleStyle is for main screen titles (bold + primary color). TitleStyle Style )
Title styles