add colors and formatting variable for ansi escape codes

This commit is contained in:
Shane C 2024-07-07 14:41:35 -04:00
parent 897ced93e2
commit bae1313e9b
Signed by: shane
GPG key ID: E46B5FEA35B22FF9

30
ansi.go Normal file
View file

@ -0,0 +1,30 @@
package tui
// Formatting
const (
FmtReset = "\033[0m"
FmtBold = "\033[1m"
FmtBoldReset = "\033[22m"
FmtDim = "\033[2m"
FmtDimReset = FmtBoldReset
FmtItalic = "\033[3m"
FmtItalicReset = "\033[23m"
FmtUnderline = "\033[4m"
FmtUnderlineReset = "\033[24m"
FmtBlink = "\033[5m"
FmtBlinkReset = "\033[25m"
FmtReverse = "\033[7m"
FmtReverseReset = "\033[27m"
FmtHidden = "\033[8m"
FmtHiddenReset = "\033[28m"
FmtStrikethrough = "\033[9m"
FmtStrikethroughReset = "\033[29m"
)
// Foreground Colors
const (
FgColorGrey = "\033[38;5;247m"
FgColorGold = "\033[28;5;214m"
FgColorGreen = "\033[38;5;34m"
FgColorRed = "\033[38;5;167m"
)