SGR 90–97 — Bright foreground color
Bright variants of the 8 basic foreground colors (aixterm/xterm extension).
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b[91m (bright red, 90–97)\033[91m\e[91mESC [ 9 1 m1b 5b 39 31 6dLive preview
Rendered in your browser via the same tokeniser the decoder uses — no terminal needed.
Description
Non-standard but ubiquitously supported aixterm extension that exposes the upper 8 of the original 16-color palette as their own SGR parameters. Maps 1:1 — 90 bright black (often rendered as a mid-gray), 91 bright red, 92 bright green, 93 bright yellow, 94 bright blue, 95 bright magenta, 96 bright cyan, 97 bright white. The 90–97 range was reserved by IBM's aixterm for the brighter half of the VGA 16-color palette and was picked up by xterm in the 1990s; it now ships in every emulator in the support matrix above, including the Linux console / fbcon and ConPTY. ECMA-48 itself defines only SGR 30–37 + 38 + 39; the bright range is documented in xterm-ctlseqs as the canonical extension and is what tput setaf 9 through tput setaf 15 expand to on xterm-256color and equivalent terminfo entries.
The portability win is decoupling from the bold-as-bright wrinkle that plagues sgr-bold. On terminals where SGR 1 + a basic color brightens the foreground (Linux console / fbcon, conhost.exe, xterm with boldColors X resource on), \x1b[1;31m and \x1b[91m look identical; on terminals that render SGR 1 as a font-weight switch (xterm with default settings, iTerm2, kitty, alacritty, wezterm, ghostty, Windows Terminal, modern gnome-terminal and konsole) the two diverge — \x1b[1;31m is bold-weight red, \x1b[91m is bright red with normal weight. Log-highlighting code that targets both classes of terminal should prefer the bright range so the output looks consistent everywhere. The other portability gotcha is theme: the actual RGB for SGR 90–97 is user-defined (xterm's BoldBrightColors resource, iTerm2's ANSI Bright palette, kitty's color8–color15 settings, Windows Terminal's brightBlack…brightWhite keys, konsole's color-scheme entries), so the "bright red" you ship may render as deep magenta or muted pink on a customized profile.
Disable just the foreground with \x1b[39m (SGR default-fg) — surgical, leaves background and other attributes intact. The full reset \x1b[0m clears everything. If you need a precise hue that bypasses the user's color scheme entirely, use sgr-fg-truecolor (\x1b[38;2;R;G;Bm) — truecolor paths don't consult the palette. The clean pattern for closing a single-color span is \x1b[91mtext\x1b[39m; the surgical pattern for a bright-bold span is \x1b[1;91mtext\x1b[22;39m (close bold + close fg in one go).
Spec citation: aixterm color extension (xterm-ctlseqs)
Examples
for c in 90 91 92 93 94 95 96 97; do printf "\033[${c}m■\033[0m"; done; echofor c in range(90, 98): print(f'\x1b[{c}m■\x1b[0m', end='')for c := 90; c <= 97; c++ { fmt.Printf("\x1b[%dm■\x1b[0m", c) }for (let c = 90; c <= 97; c++) process.stdout.write(`\x1b[${c}m■\x1b[0m`)for (int c = 90; c <= 97; c++) printf("\x1b[%dm■\x1b[0m", c);Used in
Real-world tools that emit this sequence — anchors the bytes to commands you've already used.
- starship, oh-my-zsh, powerlevel10kbranded prompt segments — bright cyan for path, bright green for git-clean
- git log --oneline --decoratebright yellow on HEAD, bright cyan on remote refs
- ls --color (bright cyan = symlink target on many distros)
- gcc, clangbright magenta on `warning:`, bright cyan on `note:`
- bash, zsh prompt PS1 (bright colours for highlight)
Frequently asked
Short answers to the questions developers actually search for this sequence.
- Is
\x1b[91mportable across all 256-colour terminals? - Mostly, but not universally. SGR 90–97 are aixterm-standard bright foreground slots (palette indices 8–15) and every modern terminal in the support matrix renders them — xterm, kitty, iTerm2, alacritty, wezterm, ghostty, Windows Terminal, gnome-terminal, konsole. The exceptions are stripped-down environments: Linux fbcon prior to 4.7, some pager-piped contexts where the parser only knows 30–37, and CI log renderers capping at 8 colours (see the sibling pitfall on
\x1b[101m). For absolute portability use\x1b[38;5;9m(256-colour palette slot 9) — it falls back to slot 1 on 8-colour terminals more gracefully than the bright-bit code does. - How do I print bright-red on macOS Terminal default profile (which maps fg-bright-red to grey)?
- Bypass the palette entirely with truecolor —
\x1b[38;2;255;85;85mpaints the xterm bright-red RGB literally, regardless of the user's profile. SGR 90–97 are palette lookups, and the Basic / Pro profiles in macOS Terminal deliberately remap several bright slots to grey-scale for terminal-style readability on white backgrounds. You can also tell users to switch to axterm-faithful profile, but that's a support-ticket loop you don't want — seesgr-fg-truecolorfor the recommended portable pattern.
Terminal support
- xterm
- yes
- Linux console (fbcon)
- yes
- macOS Terminal.app
- yes
- iTerm2
- yes
- Windows Terminal
- yes
- cmd.exe / ConPTY
- yes
- kitty
- yes
- alacritty
- yes
- WezTerm
- yes
- Ghostty
- yes
- GNOME Terminal
- yes
- Konsole
- yes
- tmux
- yes
- GNU screen
- yes
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes |