-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathansi.go
50 lines (47 loc) · 1.76 KB
/
ansi.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
package ansi
// EscSeq is a predefined ANSI escape sequence
type EscSeq string
// ANSI escape sequences
// NOTE: in a standard xterm terminal the light colors will appear BOLD instead of the light variant
const (
Reset EscSeq = "\x1b[0m"
Italics = "\x1b[3m"
Underline = "\x1b[4m"
Blink = "\x1b[5m"
Inverse = "\x1b[7m"
ItalicsOff = "\x1b[23m"
UnderlineOff = "\x1b[24m"
BlinkOff = "\x1b[25m"
InverseOff = "\x1b[27m"
Black = "\x1b[30m"
DarkGray = "\x1b[30;1m"
Red = "\x1b[31m"
LightRed = "\x1b[31;1m"
Green = "\x1b[32m"
LightGreen = "\x1b[32;1m"
Yellow = "\x1b[33m"
LightYellow = "\x1b[33;1m"
Blue = "\x1b[34m"
LightBlue = "\x1b[34;1m"
Magenta = "\x1b[35m"
LightMagenta = "\x1b[35;1m"
Cyan = "\x1b[36m"
LightCyan = "\x1b[36;1m"
Gray = "\x1b[37m"
White = "\x1b[37;1m"
ResetForeground = "\x1b[39m"
BlackBackground = "\x1b[40m"
RedBackground = "\x1b[41m"
GreenBackground = "\x1b[42m"
YellowBackground = "\x1b[43m"
BlueBackground = "\x1b[44m"
MagentaBackground = "\x1b[45m"
CyanBackground = "\x1b[46m"
GrayBackground = "\x1b[47m"
ResetBackground = "\x1b[49m"
Bold = "\x1b[1m"
BoldOff = "\x1b[22m"
)
// Left out due to not being widely supported:
// StrikethroughOn = "\x1b[9m"
// StrikethroughOff = "\x1b[29m"