SGR 3 — Italic
Render following text in italic; not universally supported.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\\x1b[
\x1b[3m\\033[
\033[3m\\e[
\e[3mESC [
ESC [ 3 mhex
1b 5b 33 6dDescription
Italic is the most fragile of the basic SGR attributes. xterm, iTerm2, kitty, alacritty, wezterm, Windows Terminal and modern gnome-terminal/konsole all honor it. The Linux console, traditional cmd.exe, and ConPTY treat it as a no-op. Some terminals reuse the bit for reverse video on monochrome displays. Disable with `\x1b[23m`.
Spec citation: ECMA-48 §8.3.117 (SGR parameter 3)
Examples
printf '\033[3mitalic\033[23m back\033[0m\n'print('\x1b[3mitalic\x1b[0m')fmt.Print("\x1b[3mitalic\x1b[0m")console.log('\x1b[3mitalic\x1b[0m')printf("\x1b[3mitalic\x1b[0m\n");Terminal support
- xterm
- yes
- Linux console (fbcon)
- no
- macOS Terminal.app
- yes
- iTerm2
- yes
- Windows Terminal
- yes
- cmd.exe / ConPTY
- no
- 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 | no | yes | yes | yes | no | yes | yes | yes | yes | yes | yes | no | no |