ANSI Colors

Terminal Color Code Reference

ANSI Sequence Builder
30
31
32
33
34
35
36
37
90
91
92
93
94
95
96
97
40
41
42
43
44
45
46
47
100
101
102
103
104
105
106
107
Hello ANSI Colors!

echo -e "\e[0mHello ANSI Colors!\e[0m"
print("\033[0mHello ANSI Colors!\033[0m")

Standard Foreground Colors (30-37)

Color NameCodeBrightPreviewAction
Black3090████████
Red3191████████
Green3292████████
Yellow3393████████
Blue3494████████
Magenta3595████████
Cyan3696████████
White3797████████

Standard Background Colors (40-47)

Color NameCodeBrightPreviewAction
Black40100
Red41101
Green42102
Yellow43103
Blue44104
Magenta45105
Cyan46106
White47107

Style Codes

StyleCodePreviewDescriptionAction
Reset0ResetResets all styles
粗体1BoldIncreases font weight/brightness
暗淡2DimReduces brightness
斜体3ItalicItalic text (not supported in all terminals)
下划线4UnderlineUnderlined text
闪烁5BlinkSlow blink (disabled in most terminals)
反显7ReverseSwaps foreground and background colors
删除线9StrikeStrikethrough text

ANSI Color Code Guide

Key Features

  • Color Reference — Complete standard 8/16 color ANSI code reference
  • 256-Color Mode — Full 256-color cube and grayscale reference
  • Sequence Builder — Visually combine foreground, background, and style
  • Terminal Preview — See color effects in real time
  • Multi-Language Examples — Usage examples in Bash, Python, and more

Use Cases

  • Shell script output beautification
  • Terminal log level coloring
  • CLI tool interface design
  • Learn ANSI escape sequences
  • Terminal application development reference

常见问题

相关工具