Converting

ANSI Color Reference

Look up ANSI escape codes by code number (e.g. 31) or color name (e.g. green). Click any escape sequence to copy it. Leave input empty to see the full reference.

Text Styles

0
Reset

Reset

1
Bold

Bold

2
Dim

Dim

3
Italic

Italic

4
Underline

Underline

7
Reverse

Reverse

9
Strikethrough

Strikethrough

Standard Foreground Colors (30–37)

Aa
30#000000

Black

Aa
31#cd0000

Red

Aa
32#00cd00

Green

Aa
33#cdcd00

Yellow

Aa
34#0000ee

Blue

Aa
35#cd00cd

Magenta

Aa
36#00cdcd

Cyan

Aa
37#e5e5e5

White

Bright Foreground Colors (90–97)

Aa
90#7f7f7f

Bright Black (Gray)

Aa
91#ff0000

Bright Red

Aa
92#00ff00

Bright Green

Aa
93#ffff00

Bright Yellow

Aa
94#5c5cff

Bright Blue

Aa
95#ff00ff

Bright Magenta

Aa
96#00ffff

Bright Cyan

Aa
97#ffffff

Bright White

Background Colors (40–47)

Aa
40#000000

Black BG

Aa
41#cd0000

Red BG

Aa
42#00cd00

Green BG

Aa
43#cdcd00

Yellow BG

Aa
44#0000ee

Blue BG

Aa
45#cd00cd

Magenta BG

Aa
46#00cdcd

Cyan BG

Aa
47#e5e5e5

White BG

Usage Examples

Red textprintf "\e[31mRed text\e[0m\n"
Bold greenecho -e "\e[1;32mBold Green\e[0m"
Blue on whiteprintf "\e[34;47mBlue on White\e[0m\n"
Resetprintf "\e[0m"
Share

marduc812

2026