[PR #822] [CLOSED] Improve system theme #9722

Closed
opened 2026-02-16 18:14:03 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/822
Author: @joshmedeski
Created: 7/10/2025
Status: Closed

Base: devHead: system-theme-update


📝 Commits (1)

📊 Changes

1 file changed (+58 additions, -251 deletions)

View changed files

📝 packages/tui/internal/theme/system.go (+58 -251)

📄 Description

I use opencode within tmux and neovim and have been getting this rendering issue.

SCR-20250709-tvxe

The underlying issue here is the gray colors in the system theme are converting to RGB values that seem to be incompatible with xterm-256color:RGB. I tried adjusting wh;ich terminal profile to use for color rendering and even if I could get it to work with opencode, I'd end up messing up the Neovim colors.

I think the best solution is to stick to a true "system" theme and stick with the 4-bit color constraint. So all of the grays have been changed to ansi Black and Bright Black

SCR-20250709-ugnf

I also simplified the code duplication by creating reusable functions and using the named helper colors instead of color codes with comments.

Note

I'd like to test all the UI elements to make sure there aren't any visual regressions here, please let me know if there is a simple process for rendering all element types 🙏

Note

There is something weird going on with the status. I think it has something to do with nested styles but I ultimately didn't find the root cause. I think the ansi values end up getting converted to RGB along the way somewhere and the colors come out different.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/822 **Author:** [@joshmedeski](https://github.com/joshmedeski) **Created:** 7/10/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `system-theme-update` --- ### 📝 Commits (1) - [`b9e365d`](https://github.com/anomalyco/opencode/commit/b9e365d017f86a4b32b5389f44715db24d961733) Update system theme ### 📊 Changes **1 file changed** (+58 additions, -251 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/theme/system.go` (+58 -251) </details> ### 📄 Description I use opencode within tmux and neovim and have been getting this rendering issue. ![SCR-20250709-tvxe](https://github.com/user-attachments/assets/865e05b9-2c6a-4a19-922d-17901e7af6d0) The underlying issue here is the gray colors in the system theme are converting to RGB values that seem to be incompatible with `xterm-256color:RGB`. I tried adjusting wh;ich terminal profile to use for color rendering and even if I could get it to work with opencode, I'd end up messing up the Neovim colors. I think the best solution is to stick to a true "system" theme and stick with the 4-bit color constraint. So all of the grays have been changed to ansi Black and Bright Black ![SCR-20250709-ugnf](https://github.com/user-attachments/assets/4853c80d-b633-4275-8a3c-587eddbcfe94) I also simplified the code duplication by creating reusable functions and using the named helper colors instead of color codes with comments. > [!NOTE] > I'd like to test all the UI elements to make sure there aren't any visual regressions here, please let me know if there is a simple process for rendering all element types 🙏 > [!NOTE] > There is something weird going on with the status. I think it has something to do with nested styles but I ultimately didn't find the root cause. I think the ansi values end up getting converted to RGB along the way somewhere and the colors come out different. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:03 -05:00
yindo closed this issue 2026-02-16 18:14:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9722