Documentation ¶
Index ¶
Constants ¶
View Source
const ( Red8 = "\033[31m" BgRed8 = "\033[41m" White8 = "\033[37m" )
8 Color mode colors.
View Source
const ( BrightRed = "\033[31;1m" BgBrightRed = "\033[41;1m" )
16 bit color mode bright colors.
View Source
const ( Black = "\033[38;5;0m" Red = "\033[38;5;1m" Green = "\033[38;5;2m" Yellow = "\033[38;5;3m" Blue = "\033[38;5;4m" Magenta = "\033[38;5;5m" Cyan = "\033[38;5;6m" Grey = "\033[38;5;7m" White = "\033[38;5;15m" BgBlack = "\033[48;5;232m" BgRed256 = "\033[48;5;1m" BgGrey256 = "\033[48;5;7m" Bold = "\033[1m" Underline = "\033[4m" Reverse = "\033[7m" Reset = "\033[0m" NoWrap = "\033[?7l" DoWrap = "\033[?7h" ResetScroll = "\033[r" SaveCursor = "\033[s" // TODO: actually this may not be supported RestoreCursor = "\033[u" // by some terminals. Find some other way? HideCursor = "\033[?25l" // TODO: actually this may not be supported ShowCursor = "\033[?25h" // by some terminals. Find some other way? Suspend = "\033P=1s\033\\" // https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/2 Resume = "\033P=2s\033\\" // Normal is not the same as Reset, because Reset resets Bold/Underline/Reverse. Normal = White + BgBlack )
256 color mode colors.
Variables ¶
This section is empty.
Functions ¶
func FixedANSIWidthRight ¶
FixedANSIWidthRight returns a fixed width version of a string, padding on the right. The function will not strip ANSI codes, nor count them as "length".
func FixedWidth ¶
FixedWidth returns a fixed width version of a string.
func TerminalTitle ¶
TerminalTitle returns ANSI sequence to change the terminal title.
Types ¶
Click to show internal directories.
Click to hide internal directories.