Commands: Color SGR

Colors are set using SGR commands (like `\e[30;47m`). The following tables list the SGR codes to use. Selected colors are used for any new text entered, as well as for empty space when using clearing commands (except screen reset `\ec`, which first clears all style attriutes. The configured default colors can be restored using `SGR 39` for foreground and `SGR 49` for background.

The actual color representation of the basic 16 colors depends on a color theme which can be selected in Terminal Settings.

Foreground colors

30 31 32 33 34 35 36 37
90 91 92 93 94 95 96 97

Background colors

40 41 42 43 44 45 46 47
100 101 102 103 104 105 106 107

256-color palette

ESPTerm supports in total 256 standard colors. The dark and bright basic colors are numbered 0-7 and 8-15. To use colors higher than 15 (or 0-15 using this simpler numbering), send `CSI 38 ; 5 ; n m`, where `n` is the color to set. Use 48 for background colors.

For a fererence of all 256 shades please refer to jonasjacek.github.io/colors or look it up elsewhere.