doc.odin 947 B

12345678910111213141516171819
  1. /*
  2. Constant references to many widely-supported `ANSI` escape codes.
  3. Primarily used in terminal emulators for enhanced graphics, such as colors, text styling, and animated displays.
  4. For example, you can print out a line of cyan text like this:
  5. fmt.println(ansi.CSI + ansi.FG_CYAN + ansi.SGR + "Hellope!" + ansi.CSI + ansi.RESET + ansi.SGR)
  6. Multiple SGR (Select Graphic Rendition) codes can be joined by semicolons:
  7. fmt.println(ansi.CSI + ansi.BOLD + ";" + ansi.FG_BLUE + ansi.SGR + "Hellope!" + ansi.CSI + ansi.RESET + ansi.SGR)
  8. If your terminal supports 24-bit true color mode, you can also do this:
  9. fmt.println(ansi.CSI + ansi.FG_COLOR_24_BIT + ";0;255;255" + ansi.SGR + "Hellope!" + ansi.CSI + ansi.RESET + ansi.SGR)
  10. For more information, see:
  11. - [[ https://en.wikipedia.org/wiki/ANSI_escape_code ]]
  12. - [[ https://www.vt100.net/docs/vt102-ug/chapter5.html ]]
  13. - [[ https://invisible-island.net/xterm/ctlseqs/ctlseqs.html ]]
  14. */
  15. package ansi