[GH-ISSUE #12] Support for colors via rgb #8

Closed
opened 2026-03-04 01:01:04 +03:00 by kerem · 3 comments
Owner

Originally created by @tj on GitHub (Jan 11, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/12

Awesome project! This is exactly what I had intended on building and never got around to hahah, so thanks :D

It might be cool to support something like https://github.com/aybabtme/rgbterm for colors, you just pass a regular rgb() (or could be hex etc) and it approximates it for you—the tcell stuff is a little awkward in comparison.

Happy to PR if it's something you'd be interested in.

Originally created by @tj on GitHub (Jan 11, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/12 Awesome project! This is exactly what I had intended on building and never got around to hahah, so thanks :D It might be cool to support something like https://github.com/aybabtme/rgbterm for colors, you just pass a regular `rgb()` (or could be hex etc) and it approximates it for you—the tcell stuff is a little awkward in comparison. Happy to PR if it's something you'd be interested in.
kerem closed this issue 2026-03-04 01:01:04 +03:00
Author
Owner

@rivo commented on GitHub (Jan 11, 2018):

Thanks. Let me look into this. Will get back to you.

<!-- gh-comment-id:357045189 --> @rivo commented on GitHub (Jan 11, 2018): Thanks. Let me look into this. Will get back to you.
Author
Owner

@rivo commented on GitHub (Jan 12, 2018):

The referenced commit is for RGB color tags in TextView.

To specify RGB colors in other places, tcell provides the functions you need. Please see GetColor(), NewHexColor(), and NewRGBColor().

<!-- gh-comment-id:357171020 --> @rivo commented on GitHub (Jan 12, 2018): The referenced commit is for RGB color tags in `TextView`. To specify RGB colors in other places, `tcell` provides the functions you need. Please see [GetColor()](https://godoc.org/github.com/gdamore/tcell#GetColor), [NewHexColor()](https://godoc.org/github.com/gdamore/tcell#NewHexColor), and [NewRGBColor()](https://godoc.org/github.com/gdamore/tcell#NewRGBColor).
Author
Owner

@tj commented on GitHub (Jan 12, 2018):

oh wow I missed those, thanks!

<!-- gh-comment-id:357308620 --> @tj commented on GitHub (Jan 12, 2018): oh wow I missed those, thanks!
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/tview#8
No description provided.