ANSI Color Escape Sequences

ANSI Color Escape Sequences shows the ANSI color escape sequences.

Table A-3. ANSI color escape sequences

Code

Character attribute

FG code

Foreground color

BG code

Background color

0

Reset all attributes

30

Black

40

Black

1

Bright

31

Red

41

Red

2

Dim

32

Green

42

Green

4

Underscore

33

Yellow

43

Yellow

5

Blink

34

Blue

44

Blue

7

Reverse

35

Magenta

45

Magenta

8

Hidden

36

Cyan

46

Cyan

  

37

White

47

White

Get bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.