Skip to content

[Bug]: Integrated terminal advertises only 256 colors, so TUIs downsample truecolor #7648

Closed

Description

@kyleawayan

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Open the integrated terminal.
  2. Run a TUI that renders colored subprocess output. lazygit with delta as its diff pager is a good example. Open a commit diff.
  3. Compare the same view in a native terminal like Ghostty or iTerm2.
  4. Confirm the cause: run COLORTERM=truecolor lazygit in the same T3 terminal. The colors render correctly.

Expected behavior

24-bit colors render like a native terminal. delta's dim diff backgrounds show as dim red and green.

Actual behavior

lazygit downsamples delta's 24-bit colors to the 256-color palette, so the dim diff backgrounds land on the grey ramp and show grey instead of dim red and green.

Running the same delta output straight from the shell (git show | delta) looks correct, because that writes truecolor directly to the terminal and the embedded Ghostty VT renders it. The problem is limited to TUIs that render colored output through their own color layer: they see a 256-color terminal and downsample.

Screenshots in the T3 Code terminal: lazygit diff view (left) and lazygit launched with COLORTERM=truecolor lazygit (right) -- notice on the left screenshot the background color of the diffs is grey instead of red/green

Image

Impact

Cosmetic issue

Version or commit

main @ 3b72d17 (v0.0.33 tag)

Environment

macOS 26.5.2, Desktop App

Logs or stack traces

Screenshots, recordings, or supporting files

See "Actual behavior" section

Workaround

The pty is spawned as xterm-256color with no COLORTERM set (echo $COLORTERM prints nothing), so TUIs detect a 256-color terminal and downsample truecolor output. Prefixing COLORTERM=truecolor fixes it. T3 embeds Ghostty, which advertises COLORTERM=truecolor natively, so it may be best to align on this as well.

Current workaround is to export COLORTERM=truecolor in your shell rc, or prefix the TUI.


I am running a build with a one-line fix on my fork (default COLORTERM=truecolor when spawning the pty). Not sure if this should need discussion before a PR: kyleawayan@0d973ce

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Aug 20, 2026
  2. added a commit that references this issue on Sep 5, 2026
    85ed49b
  3. juliusmarminge commented on Sep 5, 2026

    @juliusmarminge
    Member

    Fixed by #7680, merged September 5, 2026 as 89ee69e4.

    The shared terminal manager now defaults missing or empty COLORTERM to truecolor for both PTY backends. It preserves nonempty configured values and leaves TERM unchanged. In the actual Linux web terminal, the shell reported an empty value before the patch and truecolor in a newly opened terminal after it. Direct 24-bit red and green backgrounds rendered in both runs. All 69 focused terminal tests and current-head CI passed.

    Before:

    Before: truecolor rendering works but COLORTERM is empty

    After:

    After: a newly opened terminal advertises truecolor

    This verifies the reported missing capability advertisement, not a fresh native macOS lazygit run. Please open a new terminal after updating. If the original color problem persists, open a new issue with your version, shell environment and TUI configuration so we can investigate the remaining path.

    GPT 6 Astra via Codex in T3 Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions