package core:encoding/ansi
Overview
package ansi implements 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
Index
Types (0)
This section is empty.
Constants (110)
- AUX_OFF
- AUX_ON
- BEL
- BG_BLACK
- BG_BLUE
- BG_BRIGHT_BLACK
- BG_BRIGHT_BLUE
- BG_BRIGHT_CYAN
- BG_BRIGHT_GREEN
- BG_BRIGHT_MAGENTA
- BG_BRIGHT_RED
- BG_BRIGHT_WHITE
- BG_BRIGHT_YELLOW
- BG_COLOR
- BG_COLOR_24_BIT
- BG_COLOR_8_BIT
- BG_CYAN
- BG_DEFAULT
- BG_GREEN
- BG_MAGENTA
- BG_RED
- BG_WHITE
- BG_YELLOW
- BLINK_RAPID
- BLINK_SLOW
- BOLD
- BS
- CHA
- CLIPBOARD
- CNL
- CPL
- CSI
- CUB
- CUD
- CUF
- CUP
- CUU
- DECAWM_OFF
- DECAWM_ON
- DECRC
- DECSC
- DECTCEM_HIDE
- DECTCEM_SHOW
- DSR
- ED
- EL
- ENCIRCLED
- ESC
- FAINT
- FG_BLACK
- FG_BLUE
- FG_BRIGHT_BLACK
- FG_BRIGHT_BLUE
- FG_BRIGHT_CYAN
- FG_BRIGHT_GREEN
- FG_BRIGHT_MAGENTA
- FG_BRIGHT_RED
- FG_BRIGHT_WHITE
- FG_BRIGHT_YELLOW
- FG_COLOR
- FG_COLOR_24_BIT
- FG_COLOR_8_BIT
- FG_CYAN
- FG_DEFAULT
- FG_GREEN
- FG_MAGENTA
- FG_RED
- FG_WHITE
- FG_YELLOW
- FONT_ALT1
- FONT_ALT2
- FONT_ALT3
- FONT_ALT4
- FONT_ALT5
- FONT_ALT6
- FONT_ALT7
- FONT_ALT8
- FONT_ALT9
- FONT_FRAKTUR
- FONT_PRIMARY
- FRAMED
- HIDE
- HVP
- HYPERLINK
- INVERT
- ITALIC
- NO_BLINK
- NO_BOLD_FAINT
- NO_FRAME_ENCIRCLE
- NO_HIDE
- NO_ITALIC_BLACKLETTER
- NO_OVERLINE
- NO_PROPORTIONAL_SPACING
- NO_REVERSE
- NO_STRIKE
- NO_UNDERLINE
- OSC
- OVERLINED
- PROPORTIONAL_SPACING
- RCP
- RESET
- SCP
- SD
- SGR
- ST
- STRIKE
- SU
- UNDERLINE
- UNDERLINE_DOUBLE
- WINDOW_TITLE
Variables (0)
This section is empty.
Procedures (0)
This section is empty.
Procedure Groups (0)
This section is empty.
Types
This section is empty.
Constants
BG_BLACK ¶
BG_BLACK :: "40"
BG_BRIGHT_BLUE ¶
BG_BRIGHT_BLUE :: "104"
BG_BRIGHT_CYAN ¶
BG_BRIGHT_CYAN :: "106"
BG_BRIGHT_GREEN ¶
BG_BRIGHT_GREEN :: "102"
BG_BRIGHT_MAGENTA ¶
BG_BRIGHT_MAGENTA :: "105"
BG_BRIGHT_RED ¶
BG_BRIGHT_RED :: "101"
BG_BRIGHT_WHITE ¶
BG_BRIGHT_WHITE :: "107"
BG_BRIGHT_YELLOW ¶
BG_BRIGHT_YELLOW :: "103"
BG_COLOR ¶
BG_COLOR :: "48"
BG_DEFAULT ¶
BG_DEFAULT :: "49"
BG_GREEN ¶
BG_GREEN :: "42"
BG_MAGENTA ¶
BG_MAGENTA :: "45"
BG_WHITE ¶
BG_WHITE :: "47"
BG_YELLOW ¶
BG_YELLOW :: "43"
BLINK_SLOW ¶
BLINK_SLOW :: "5"
ENCIRCLED ¶
ENCIRCLED :: "52"
FG_BLACK ¶
FG_BLACK :: "30"
FG_BRIGHT_BLUE ¶
FG_BRIGHT_BLUE :: "94"
FG_BRIGHT_CYAN ¶
FG_BRIGHT_CYAN :: "96"
FG_BRIGHT_GREEN ¶
FG_BRIGHT_GREEN :: "92"
FG_BRIGHT_MAGENTA ¶
FG_BRIGHT_MAGENTA :: "95"
FG_BRIGHT_RED ¶
FG_BRIGHT_RED :: "91"
FG_BRIGHT_WHITE ¶
FG_BRIGHT_WHITE :: "97"
FG_BRIGHT_YELLOW ¶
FG_BRIGHT_YELLOW :: "93"
FG_COLOR ¶
FG_COLOR :: "38"
FG_DEFAULT ¶
FG_DEFAULT :: "39"
FG_GREEN ¶
FG_GREEN :: "32"
FG_MAGENTA ¶
FG_MAGENTA :: "35"
FG_WHITE ¶
FG_WHITE :: "37"
FG_YELLOW ¶
FG_YELLOW :: "33"
FONT_ALT1 ¶
FONT_ALT1 :: "11"
FONT_ALT2 ¶
FONT_ALT2 :: "12"
FONT_ALT3 ¶
FONT_ALT3 :: "13"
FONT_ALT4 ¶
FONT_ALT4 :: "14"
FONT_ALT5 ¶
FONT_ALT5 :: "15"
FONT_ALT6 ¶
FONT_ALT6 :: "16"
FONT_ALT7 ¶
FONT_ALT7 :: "17"
FONT_ALT8 ¶
FONT_ALT8 :: "18"
FONT_ALT9 ¶
FONT_ALT9 :: "19"
FONT_PRIMARY ¶
FONT_PRIMARY :: "10"
NO_BLINK ¶
NO_BLINK :: "25"
NO_BOLD_FAINT ¶
NO_BOLD_FAINT :: "22"
NO_FRAME_ENCIRCLE ¶
NO_FRAME_ENCIRCLE :: "54"
NO_ITALIC_BLACKLETTER ¶
NO_ITALIC_BLACKLETTER :: "23"
NO_OVERLINE ¶
NO_OVERLINE :: "55"
NO_PROPORTIONAL_SPACING ¶
NO_PROPORTIONAL_SPACING :: "50"
NO_REVERSE ¶
NO_REVERSE :: "27"
NO_STRIKE ¶
NO_STRIKE :: "29"
NO_UNDERLINE ¶
NO_UNDERLINE :: "24"
OVERLINED ¶
OVERLINED :: "53"
PROPORTIONAL_SPACING ¶
PROPORTIONAL_SPACING :: "26"
UNDERLINE ¶
UNDERLINE :: "4"
Variables
This section is empty.
Procedures
This section is empty.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-20 21:10:45.876895900 +0000 UTC