Dim
AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard
Dim (SGR 2) is an SGR attribute that renders text with decreased intensity or a lighter appearance.
Syntax
CSI 2 m SGR 2 — Faint / decreased intensity
CSI 22 m SGR 22 — Normal intensity (reset bold and dim)
Formal syntax
SGR-dim = 0x1b, "[", "2", "m" ; SGR-normal-int = 0x1b, "[", "22", "m" ;
Description
Per ECMA-48 §8.3.117, SGR parameter 2 selects "faint, decreased intensity or second colour." Terminals typically render this by reducing the opacity or brightness of the foreground color.
Dim is reset by SGR 22, which restores normal intensity. Note that SGR 22 also cancels bold (SGR 1). SGR 0 (reset all) also clears dim.
Bold and dim are mutually exclusive on some terminals, while others allow both to be active simultaneously (with implementation-defined results).
Examples
printf '\e[2mDim text\e[22m Normal text\n'
printf '\e[2;33mDim yellow\e[0m\n'
Specifications
| Specification | Section |
|---|---|
| VT510 Reference | — |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✓ | Yes | |
| Bobcat | ? | ? | Implemented in external TerminalCtrl library, not in Bobcat source code |
| contour | ✓ | v0.1.0 | |
| foot | ✓ | Yes | Implemented at csi.c:93 |
| Ghostty | ✓ | v1.0.0 | |
| iTerm2 | ✓ | Yes | Dim/faint attribute (SGR 2) fully supported via VT100CHARATTR_FAINT in VT100GraphicRendition structure. |
| Kitty | ✓ | Yes | |
| Konsole | ✓ | Yes | SGR 2 sets RE_FAINT rendition flag |
| mintty | ✓ | Yes | Implemented at src/termout.c:2114. Sets ATTR_DIM flag. |
| mlterm | ✓ | rel-3_3_7 | SGR 2 sets is_bold=0, not a separate dim state |
| PuTTY | ✓ | 0.71 | SGR 2 sets ATTR_DIM at terminal.c:4646-4649 |
| Rio | ✓ | v0.0.3 | |
| rxvt-unicode | ✗ | No | Commented out in code with '//case 2: // low intensity' |
| st | ✓ | 0.6 | Implemented as ATTR_FAINT with dimmed color rendering |
| terminology | ✓ | v0.1.0 | Stored as faint attribute |
| VT100 | ✗ | No | |
| VTE | ✓ | Yes | |
| WezTerm | ✓ | Yes | |
| Windows Terminal | ✓ | Yes | SGR 2 sets faint attribute |
| xterm | ✓ | Yes | ECMA-48 2nd edition feature, requires OPT_WIDE_ATTRS |
| xterm.js | ✓ | 3.0.0 | |
| Multiplexers | |||
| cy | ✗ | No | |
| GNU Screen | ✓ | v.4.2.0 | SGR 2 mapped to A_DI attribute at src/ansi.c:1703 |
| tmux | ✓ | 0.8 | |
| tuios | ✓ | v0.0.15 | |
| Zellij | ✓ | v0.12.0 | |
See also
- Bold — SGR 1 — Increased intensity