aboutsummaryrefslogtreecommitdiff
path: root/core/terminal/ansi/doc.odin
blob: 7f1d30b1bfaa05dac91e48acddb0cc39b871f289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
Constant references to many widely-supported `ANSI` escape codes.
Primarily used in terminal emulators for enhanced graphics, such as colors, text styling, and animated displays.

For example, you can print out a line of cyan text like this:
	fmt.println(ansi.CSI + ansi.FG_CYAN + ansi.SGR + "Hellope!" + ansi.CSI + ansi.RESET + ansi.SGR)

Multiple SGR (Select Graphic Rendition) codes can be joined by semicolons:
	fmt.println(ansi.CSI + ansi.BOLD + ";" + ansi.FG_BLUE + ansi.SGR + "Hellope!" + ansi.CSI + ansi.RESET + ansi.SGR)

If your terminal supports 24-bit true color mode, you can also do this:
	fmt.println(ansi.CSI + ansi.FG_COLOR_24_BIT + ";0;255;255" + ansi.SGR + "Hellope!" + ansi.CSI + ansi.RESET + ansi.SGR)

For more information, see:
- [[ https://en.wikipedia.org/wiki/ANSI_escape_code ]]
- [[ https://www.vt100.net/docs/vt102-ug/chapter5.html ]]
- [[ https://invisible-island.net/xterm/ctlseqs/ctlseqs.html ]]
*/
package ansi