-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhelp.html
59 lines (57 loc) · 2.42 KB
/
help.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>ANSI code generator</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LZXP6V3DB2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-LZXP6V3DB2');
</script>
</head>
<body>
<div class="head">
<div>
<a href="index.html">home</a>
<a href="help.html">help</a>
<a target="_blank" rel="noopener noreferrer" href="https://gabebanks.net/donate.html">donate</a>
</div>
<a href="https://gabebanks.net">gabebanks.net</a>
</div>
<div class="main helpbox">
<h1>Help<br/><br/></h1>
<h2>What is an ANSI escape code?</h2>
<p class="help">
ANSI escape codes are special sequences of characters used to print certain styles and colors to terminal emulators.
The codes are prefixed by an escape sequence, such as \x1b. Then, the codes are listed between '[' and 'm', delimited by semicolons ';'.
Each code is a number corresponding to a different style.
</p>
<h2>Example</h2>
<p class="help">
For example, the code for red text is 31. Thus, if you were to print \x1b[31m to the terminal,
any text following would be red.
</p>
<img src='ex1.png' class='help'/>
<p class="help">
Thus it is important to print the escape code for RESET (\x1b[0m) after finishing printing your stylized text, to return
the style back to normal.
</p>
<img src='ex2.png' class='help'/>
<h2>More information</h2>
<p class="help">
More information about ANSI escape codes can be found <a href="https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797">here</a>.
</p>
<p class="help">
Here is a <a href='https://www.reddit.com/r/linux/comments/so61ne/i_made_a_tool_to_generate_ansi_escape_codes_so/'>recorded demo on reddit</a> of using this tool.
</p>
</div>
<div class="foot">
</div>
</body>
</html>