-
Notifications
You must be signed in to change notification settings - Fork 1
/
ansi_escape_sequences.txt
95 lines (59 loc) · 1.17 KB
/
ansi_escape_sequences.txt
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
78
79
80
81
82
83
84
85
86
87
88
89
90
Some of the ansi escape sequences,
also documented in ./doc/..
Available colors can be displayed with the script ansicolors.sh in ./test
COLORS
------
'\e[X1m'
'\e[X1;X2m'
'\e[X1;X2;X3m'
...
X1..X defines color and attributes.
30..37: foreground color
40..47: background color
colors, in order:
black
red
green
yellow(brown)
blue
magenta
cyan
white(gray)
90..97: bold fg color
100..107: bold bg color
ATTRIBUTES
----------
0 clear all attributes
1 bold
2 faint
3 cursive
4 underline
5 blink
6 blink
7 reverse
9 strikethrough
21 double underline
attributes can be combined, also 1 and 2 (=bold_faint)
combining blink and reverse blinks by reversing
foreground and background colors.
strikethrough and underline gets double underline
255 COLORS
----------
foreground: '\e[38;5;XXm'
xx one of 16-255
background: '\e[48;5;XXm'
CURSOR
------
'\e[X q'
standard (no blinking):
1,2: block cursor
3,4: underline
5,6: vertical bar
slterm:
7: 'X'
7;Y: Y is the ascii code of the char, used as cursor
8: double underline
9: empty block
10: underline, two lines at the sides
11: underline and overline, lines right and left
12: overline, lines right and left