Documentation
¶
Overview ¶
Package banner provides the figlet + lolcat startup banner shared between the CLI REPL and the TUI.
The rainbow coloring algorithm is vendored from github.com/flaviocopes/gololcat (which is package main and not importable as a library).
Index ¶
Constants ¶
const Title = "yaah"
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate renders "yaah" as figlet ASCII art with lolcat rainbow coloring, followed by the tagline and subtitle. Picks a random font from the curated list on each call. Returns the styled banner string and its line count. Falls back to plain "yaah" if figlet fails. Respects the NO_COLOR environment variable.
func GeneratePlain ¶ added in v0.45.0
GeneratePlain renders "yaah" as plain figlet ASCII art (no ANSI coloring) plus a random tagline. Returns the art, the tagline, and the line count.
Use this when you need to apply your own color markup (e.g. tview color tags) instead of ANSI escape codes — call LolcatRGB for each character index to get the same rainbow gradient.
func Lolcat ¶ added in v0.6.1
Lolcat applies lolcat rainbow coloring to arbitrary ASCII art text. Each character receives an RGB color from the sine-wave algorithm. Respects the NO_COLOR environment variable.
func LolcatRGB ¶ added in v0.45.0
lolcatRGB maps a character index to an RGB triple using the same sine-wave algorithm as gololcat / the original lolcat. LolcatRGB maps a character index to a rainbow RGB triple (same algorithm used by Lolcat). Useful for consumers that need to apply their own color markup (e.g. tview color tags instead of ANSI escape codes).
Types ¶
This section is empty.