Skip to main content

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​

SpecificationSection
VT510 Reference—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✓Yes
Bobcat??Implemented in external TerminalCtrl library, not in Bobcat source code
contour✓v0.1.0
foot✓YesImplemented at csi.c:93
Ghostty✓v1.0.0
iTerm2✓YesDim/faint attribute (SGR 2) fully supported via VT100CHARATTR_FAINT in VT100GraphicRendition structure.
Kitty✓Yes
Konsole✓YesSGR 2 sets RE_FAINT rendition flag
mintty✓YesImplemented at src/termout.c:2114. Sets ATTR_DIM flag.
mlterm✓rel-3_3_7SGR 2 sets is_bold=0, not a separate dim state
PuTTY✓0.71SGR 2 sets ATTR_DIM at terminal.c:4646-4649
Rio✓v0.0.3
rxvt-unicode✗NoCommented out in code with '//case 2: // low intensity'
st✓0.6Implemented as ATTR_FAINT with dimmed color rendering
terminology✓v0.1.0Stored as faint attribute
VT100✗No
VTE✓Yes
WezTerm✓Yes
Windows Terminal✓YesSGR 2 sets faint attribute
xterm✓YesECMA-48 2nd edition feature, requires OPT_WIDE_ATTRS
xterm.js✓3.0.0
Multiplexers
cy✗No
GNU Screen✓v.4.2.0SGR 2 mapped to A_DI attribute at src/ansi.c:1703
tmux✓0.8
tuios✓v0.0.15
Zellij✓v0.12.0

See also​