Documentation ¶
Overview ¶
Package ansi defines ANSI control codes for styles and colours.
Index ¶
Constants ¶
const ClearLine = "\033[2K"
ClearLine is the CSI sequence to clear the entire of the current line.
const CursorBackwardOne = "\033[1D"
CursorBackwardOne is the CSI sequence to move the cursor backward (to the left for latin fonts) one character.
const CursorForwardOne = "\033[1C"
CursorForwardOne is the CSI sequence to move the cursor forward (to the right for latin fonts) one character.
const CursorRestore = "\033[u"
CursorRestore if the CSI sequence to restore the cursor position to a previous store.
const CursorStore = "\033[s"
CursorStore if the CSI sequence to store the current cursor position.
Variables ¶
var DimPens map[string]string
DimPens is the table of pastel colors to be used for text.
var NormalPen string
NormalPen is the CSI sequence for regular text.
var PenStyles map[string]string
PenStyles is the table of styles to be used for text.
var Pens map[string]string
Pens is the table of colors to be used for text.
Functions ¶
func ColorBuild ¶
ColorBuild creates the ANSI sequence to create the pen with the correct foreground/background color and attribute.
func CursorMove ¶
CursorMove is the CSI sequence to move the cursor n characters forward (positive numbers) or n characters backwards (negative numbers).
Types ¶
This section is empty.