[GH-ISSUE #805] Transparent backgrounds are composited against black instead of the terminal background #986

Open
opened 2026-03-14 09:12:19 +03:00 by kerem · 0 comments
Owner

Originally created by @akronb on GitHub (Mar 12, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/805

Semi-transparent backgrounds rendered over transparent areas seem to be composited against black rather than the terminal’s actual background color. I first noticed this in opencode (https://github.com/anomalyco/opencode/issues/13363), but it seems to be related to opentui.

I made a minimal repro that renders the same semi-transparent red overlay in two cases: over a solid white base and over a transparent background.

As you can see from the screenshot of my repro, when the background is transparent, it becomes black under the overlay for some reason.

Image

Environment

  • @opentui/core ^0.1.87
  • bun 1.3.10
  • macOS 15.7.4
  • Ghostty 1.3.0
Originally created by @akronb on GitHub (Mar 12, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/805 Semi-transparent backgrounds rendered over transparent areas seem to be composited against black rather than the terminal’s actual background color. I first noticed this in `opencode` (https://github.com/anomalyco/opencode/issues/13363), but it seems to be related to `opentui`. I made [a minimal repro](https://github.com/akronb/opentui-transparent-compositing-repro) that renders the same semi-transparent red overlay in two cases: over a solid white base and over a transparent background. As you can see from the screenshot of my repro, when the background is transparent, it becomes black under the overlay for some reason. <img width="1512" height="887" alt="Image" src="https://github.com/user-attachments/assets/267eb217-9538-4712-a6f4-57bb659bfd04" /> #### Environment - `@opentui/core ^0.1.87` - `bun 1.3.10` - `macOS 15.7.4` - `Ghostty 1.3.0`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#986
No description provided.