mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #390] [MERGED] fix(diff): add fg prop to support light mode themes #505
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#505
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/390
Author: @code-yeongyu
Created: 12/6/2025
Status: ✅ Merged
Merged: 12/8/2025
Merged by: @kommander
Base:
main← Head:fix/diff-fg-light-mode📝 Commits (1)
e49e14ffix(diff): add fg prop to support light mode themes📊 Changes
2 files changed (+212 additions, -0 deletions)
View changed files
📝
packages/core/src/renderables/Diff.test.ts(+188 -0)📝
packages/core/src/renderables/Diff.ts(+24 -0)📄 Description
Fix unreadable diff text on light mode themes by adding
fgprop.Problem
When using DiffRenderable with light mode themes, syntax-unhighlighted tokens render as white text (hardcoded default in CodeRenderable), making them invisible on light backgrounds.
This is problematic on OpenCode light theme diff editor where no syntax highlighting is supported- the letters are all rendered as white.
Solution
Add
fgprop to DiffRenderable, allowing consumers to pass a foreground color that propagates to underlying CodeRenderables.Changes
fgoption to DiffRenderableOptionsfgto CodeRenderables on construction and updates🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.