SGR 100–107 — 高亮背景色
8 种基础背景色的高亮变体。
字节形式
涵盖所有常见的字符串字面量写法,方便正反查找。
\\x1b[
\x1b[101m (bright red bg, 100–107)\\033[
\033[101m\\e[
\e[101mESC [
ESC [ 1 0 1 mhex
1b 5b 31 30 31 6d说明
40–47 的高亮背景版本。100 亮黑、101 亮红、……、107 亮白。与前景 90–97 同属 aixterm 扩展。
规范出处: aixterm color extension
示例
for c in 100 101 102 103 104 105 106 107; do printf "\033[${c}m \033[0m"; done; echofor c in range(100, 108): print(f'\x1b[{c}m \x1b[0m', end='')for c := 100; c <= 107; c++ { fmt.Printf("\x1b[%dm \x1b[0m", c) }for (let c = 100; c <= 107; c++) process.stdout.write(`\x1b[${c}m \x1b[0m`)for (int c = 100; c <= 107; c++) printf("\x1b[%dm \x1b[0m", c);终端支持
- xterm
- 支持
- Linux console (fbcon)
- 支持
- macOS Terminal.app
- 支持
- iTerm2
- 支持
- Windows Terminal
- 支持
- cmd.exe / ConPTY
- 支持
- kitty
- 支持
- alacritty
- 支持
- WezTerm
- 支持
- Ghostty
- 支持
- GNOME Terminal
- 支持
- Konsole
- 支持
- tmux
- 不支持
- GNU screen
- 不支持
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 不支持 | 不支持 |