-
Notifications
You must be signed in to change notification settings - Fork 0
/
sgr.go
77 lines (64 loc) · 1.63 KB
/
sgr.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* Copyright (c) 2023 Brandon Jordan
*/
package ttuy
type SGR string
var fg SGR = "38;5;"
var bg SGR = "48;5;"
const Reset = CSI + "0m"
// Decorations
const Bold SGR = "1"
const Dim SGR = "2"
const Italic SGR = "3"
const Underlined SGR = "4"
const Blink SGR = "5"
const BlinkFast SGR = "6"
const Inverted SGR = "7"
const Hidden SGR = "8"
const Crossed SGR = "9"
// Basic
const black SGR = "0"
const red SGR = "1"
const green SGR = "2"
const yellow SGR = "3"
const blue SGR = "4"
const magenta SGR = "5"
const cyan SGR = "6"
const gray SGR = "8"
const brightRed SGR = "9"
const brightGreen SGR = "10"
const brightYellow SGR = "11"
const brightBlue SGR = "12"
const brightMagenta SGR = "13"
const brightCyan SGR = "14"
const white SGR = "15"
var BlackText = fg + black
var RedText = fg + red
var GreenText = fg + green
var YellowText = fg + yellow
var BlueText = fg + blue
var MagentaText = fg + magenta
var CyanText = fg + cyan
var WhiteText = fg + white
var GrayText = fg + gray
var BrightRedText = fg + brightRed
var BrightGreenText = fg + brightGreen
var BrightYellowText = fg + brightYellow
var BrightBlueText = fg + brightBlue
var BrightMagentaText = fg + brightMagenta
var BrightCyanText = fg + brightCyan
var BlackBg = bg + black
var RedBg = bg + red
var GreenBg = bg + green
var YellowBg = bg + yellow
var BlueBg = bg + blue
var MagentaBg = bg + magenta
var CyanBg = bg + cyan
var WhiteBg = bg + white
var GrayBg = bg + gray
var BrightRedBg = bg + brightRed
var BrightGreenBg = bg + brightGreen
var BrightYellowBg = bg + brightYellow
var BrightBlueBg = bg + brightBlue
var BrightMagentaBg = bg + brightMagenta
var BrightCyanBg = bg + brightCyan