mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #111] [CLOSED] fix: improve nested buffer alpha blending and fix ascii background bug #296
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#296
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/111
Author: @KurtGokhan
Created: 8/31/2025
Status: ❌ Closed
Base:
main← Head:fix-nested-buffer-alpha-blending📝 Commits (7)
157741bfix ascii buffer not rendering with transparent backgroundb813675better alpha blending for background colors7404ea9improve alpha blending for bg modef007acfimprove example32dbf21fix format479fcc8add nested buffer example3d0241bformat fix📊 Changes
2 files changed (+143 additions, -30 deletions)
View changed files
📝
packages/core/src/examples/framebuffer-demo.ts(+108 -11)📝
packages/core/src/zig/buffer.zig(+35 -19)📄 Description
Noticed that the background of ASCII characters weren't preserved when rendered inside a framebuffer. Made some changes to skip rendering invisible foreground and background colors.
While working on that I had to also change the blending algorithm for background colors, as it was also causing subtle issues with ASCII fonts. It can be seen in the videos below, where before the overlay text bg looks more frosted, whereas in the after video it's more actual color blending. Maybe we can add color blending modes in the future to leave the preference to the user.
Before:
https://github.com/user-attachments/assets/a8fe7c1c-8e44-4e7f-9baa-9e30fac2eecd
After:
https://github.com/user-attachments/assets/ef942023-fdad-4824-abd2-6471008a9fbb
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.