[PR #261] [CLOSED] Fixing color setting for tcell. #285

Closed
opened 2026-03-03 16:23:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mum4k/termdash/pull/261
Author: @mum4k
Created: 11/15/2020
Status: Closed

Base: develHead: dyc3-tcell-2.x-upgrade-color-fix


📝 Commits (5)

  • 4d320e3 upgrade tcell to v2.x
  • 503c0ad Fixing color setting for tcell.
  • b4d53c1 Removing commented-out code.
  • 0efc4a2 Updating CHANGELOG.
  • 41375b8 Translating colors for backward compatibility with termbox-go.

📊 Changes

12 files changed (+338 additions, -141 deletions)

View changed files

📝 CHANGELOG.md (+5 -1)
📝 cell/color.go (+21 -4)
📝 go.mod (+1 -1)
📝 go.sum (+2 -0)
📝 terminal/tcell/cell_options.go (+23 -17)
📝 terminal/tcell/cell_options_test.go (+262 -109)
📝 terminal/tcell/event.go (+1 -1)
📝 terminal/tcell/event_test.go (+1 -1)
📝 terminal/tcell/tcell.go (+2 -2)
📝 terminal/tcell/tcell_test.go (+1 -1)
📝 terminal/termbox/cell_options.go (+16 -1)
📝 terminal/terminalapi/color_mode.go (+3 -3)

📄 Description

Our tcell library incorrectly referenced tcell color values rather than
just names. The values aren't part of the public API and did change with
the update to v2.

This commit switches our tcell library to using the public constants
exported by the tcell project.

Also aligning our color definition of the first 16 colors with tcell
and Xterm. Adding two additional colors to make this change backward
compatible with termbox-go.


🔄 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/mum4k/termdash/pull/261 **Author:** [@mum4k](https://github.com/mum4k) **Created:** 11/15/2020 **Status:** ❌ Closed **Base:** `devel` ← **Head:** `dyc3-tcell-2.x-upgrade-color-fix` --- ### 📝 Commits (5) - [`4d320e3`](https://github.com/mum4k/termdash/commit/4d320e3f2ea4b7a218dc1a3eb3e0abe664af135a) upgrade tcell to v2.x - [`503c0ad`](https://github.com/mum4k/termdash/commit/503c0ada52f554912be06f9d1853059175e6fb77) Fixing color setting for `tcell`. - [`b4d53c1`](https://github.com/mum4k/termdash/commit/b4d53c1f6caad4330907794b692881b7fef6caa0) Removing commented-out code. - [`0efc4a2`](https://github.com/mum4k/termdash/commit/0efc4a21a30a5f89db81b2af5682aa5640977172) Updating CHANGELOG. - [`41375b8`](https://github.com/mum4k/termdash/commit/41375b89351a1963552d91cb19dc11af36580690) Translating colors for backward compatibility with termbox-go. ### 📊 Changes **12 files changed** (+338 additions, -141 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -1) 📝 `cell/color.go` (+21 -4) 📝 `go.mod` (+1 -1) 📝 `go.sum` (+2 -0) 📝 `terminal/tcell/cell_options.go` (+23 -17) 📝 `terminal/tcell/cell_options_test.go` (+262 -109) 📝 `terminal/tcell/event.go` (+1 -1) 📝 `terminal/tcell/event_test.go` (+1 -1) 📝 `terminal/tcell/tcell.go` (+2 -2) 📝 `terminal/tcell/tcell_test.go` (+1 -1) 📝 `terminal/termbox/cell_options.go` (+16 -1) 📝 `terminal/terminalapi/color_mode.go` (+3 -3) </details> ### 📄 Description Our tcell library incorrectly referenced tcell color values rather than just names. The values aren't part of the public API and did change with the update to v2. This commit switches our tcell library to using the public constants exported by the `tcell` project. Also aligning our color definition of the first 16 colors with `tcell` and Xterm. Adding two additional colors to make this change backward compatible with `termbox-go`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 16:23:42 +03:00
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/termdash#285
No description provided.