Variable ANSI
constANSI: {fg: {black:string;red:string;green:string;yellow:string;blue:string;magenta:string;cyan:string;white:string; };bg: {black:string;red:string;green:string;yellow:string;blue:string;magenta:string;cyan:string;white:string; };screen: {enterAltBuffer:string;exitAltBuffer:string;clear:string;home:string; };decoration: {dim:string;bold:string;underline:string; };reset:string; }
Source: ansi.const.ts
ANSI escape codes.
Type Declaration
fg
fg: {
black:string;red:string;green:string;yellow:string;blue:string;magenta:string;cyan:string;white:string; }
Foreground colors.
fg.black
black:
string="\u001b[30m"
fg.red
red:
string="\u001b[31m"
fg.green
green:
string="\u001b[32m"
fg.yellow
yellow:
string="\u001b[33m"
fg.blue
blue:
string="\u001b[34m"
fg.magenta
magenta:
string="\u001b[35m"
fg.cyan
cyan:
string="\u001b[36m"
fg.white
white:
string="\u001b[37m"
bg
bg: {
black:string;red:string;green:string;yellow:string;blue:string;magenta:string;cyan:string;white:string; }
Background colors.
bg.black
black:
string="\u001b[40m"
bg.red
red:
string="\u001b[41m"
bg.green
green:
string="\u001b[42m"
bg.yellow
yellow:
string="\u001b[43m"
bg.blue
blue:
string="\u001b[44m"
bg.magenta
magenta:
string="\u001b[45m"
bg.cyan
cyan:
string="\u001b[46m"
bg.white
white:
string="\u001b[47m"
screen
screen: {
enterAltBuffer:string;exitAltBuffer:string;clear:string;home:string; }
Screen buffer and clearing controls.
screen.enterAltBuffer
enterAltBuffer:
string="\u001b[?1049h"
screen.exitAltBuffer
exitAltBuffer:
string="\u001b[?1049l"
screen.clear
clear:
string="\u001b[2J"
screen.home
home:
string="\u001b[H"
decoration
decoration: {
dim:string;bold:string;underline:string; }
Decorations.
decoration.dim
dim:
string="\u001b[2m"
decoration.bold
bold:
string="\u001b[1m"
decoration.underline
underline:
string="\u001b[4m"
reset
reset:
string="\u001b[0m"