SGR 1 — Bold / Increased intensity
Render following text in bold (or bright on some terminals).
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\\x1b[
\x1b[1m\\033[
\033[1m\\e[
\e[1mESC [
ESC [ 1 mhex
1b 5b 31 6dDescription
Turns on bold weight on most modern terminals. On older terminals and some retro emulators (Linux console with VGA fonts) this instead brightens the foreground color (mapping color N to color N+8). To turn bold OFF without clearing other attributes, emit `\x1b[22m` (SGR 22, normal intensity).
Spec citation: ECMA-48 §8.3.117 (SGR parameter 1)
Examples
printf '\033[1mbold\033[22m normal\033[0m\n'print('\x1b[1mbold\x1b[0m')fmt.Print("\x1b[1mbold\x1b[0m")console.log('\x1b[1mbold\x1b[0m')printf("\x1b[1mbold\x1b[0m\n");Terminal support
- xterm
- yes
- Linux console (fbcon)
- partial
- macOS Terminal.app
- yes
- iTerm2
- yes
- Windows Terminal
- yes
- cmd.exe / ConPTY
- partial
- kitty
- yes
- alacritty
- yes
- WezTerm
- yes
- Ghostty
- yes
- GNOME Terminal
- yes
- Konsole
- yes
- tmux
- no
- GNU screen
- no
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | partial | yes | yes | yes | partial | yes | yes | yes | yes | yes | yes | no | no |