Skip to content

Commit 9e64176

Browse files
committed
docs(cli-rs): record the GNU screen color deviation from OpenTUI #1967
1 parent baff3ff commit 9e64176

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# OT1967: GNU screen gets 256 colors even with `COLORTERM=truecolor`
2+
3+
TypeScript: the TUI uses `@opentui/core` 0.8.1 from npm. Inside GNU screen (`STY`, or a `screen*` `TERM` without
4+
`TMUX`), an inherited `COLORTERM=truecolor` or `24bit` makes it write 24-bit SGR colors (`38;2;r;g;b`). Screen 5
5+
drops these unless its `truecolor` setting is on, so cells lose their color.
6+
7+
Rust: the client pins OpenTUI `c08bb0e90`, which includes anomalyco/opentui#1967. Inside GNU screen, OpenTUI ignores
8+
`COLORTERM` and writes 256-color SGR (`38;5;n`). Set `OPENTUI_FORCE_TRUECOLOR=1` (or `true`) to force 24-bit color,
9+
for example with `setenv OPENTUI_FORCE_TRUECOLOR 1` in `.screenrc` when screen's `truecolor` is on. With
10+
`TERM=screen-256color COLORTERM=truecolor` under a PTY, the Rust home screen writes 200 `38;5`/`48;5` colors and no
11+
`38;2`/`48;2` colors; TS writes 274 `38;2`/`48;2` colors. With `OPENTUI_FORCE_TRUECOLOR=1`, both write 24-bit.
12+
13+
Reason: the OpenTUI fix landed after the npm release that TS uses. The difference goes away when TS moves to an
14+
`@opentui/core` release that includes #1967.

0 commit comments

Comments
 (0)