VT100 terminal control codes

Code Meaning
<ESC>[0m Reset all color and text attributes
<ESC>[1m Bright/bold color
<ESC>[2m Dim/unbold color
<ESC>[4m Underline text
<ESC>[5m Blinking text
<ESC>[7m Reversed color text (foreground and background colors are swapped)
<ESC>[8m Hidden Text (characters not displayed)
<ESC>[30m Black foreground
<ESC>[31m Red foreground
<ESC>[32m Green foreground
<ESC>[33m Yellow foreground
<ESC>[34m Blue foreground
<ESC>[35m Magenta foreground
<ESC>[36m Cyan foreground
<ESC>[37m White foreground
<ESC>[40m Black background
<ESC>[41m Red background
<ESC>[42m Green background
<ESC>[43m Yellow background
<ESC>[44m Blue background
<ESC>[45m Magenta background
<ESC>[46m Cyan background
<ESC>[47m White background
<ESC>[<R>;<C>H Move cursor to row <R> and column <C>, or to the "HOME" position if both <R> and <C> are omitted.
<ESC><C>A Move cursor up <C>, or one line if <C> is omitted.
<ESC><C>B Move cursor down <C>, or one line if <C> is omitted.
<ESC><C>C Move cursor forward <C>, or one space if <C> is omitted.
<ESC>[K Erase everything after the cursor on the current line.
<ESC>[1K Erase everything before the cursor on the current line.
<ESC>[2K Erase the current line.
<ESC>[J Erase every line below the current line.
<ESC>[1J Erase every line above the current line.
<ESC>[2J Erase entire screen.

home

Wenton's email (wenton@ieee.org)