mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 13:55:51 +03:00
[GH-ISSUE #1021] format texti input as '\e]4;1;%s\a\e[0;41m \e[m' "$1" to show color text directly #740
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#740
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?
Originally created by @wellcomez on GitHub (Sep 2, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/1021
I find bash can use e]xxx ..... e[m to define text color directly. This way is more flexisible than using ui style.
add api:
@kivattt commented on GitHub (Sep 2, 2024):
You can use a style tag string with tcell's color.String() for this:
https://pkg.go.dev/github.com/rivo/tview#hdr-Styles__Colors__and_Hyperlinks
@rivo commented on GitHub (Sep 2, 2024):
In addition to @kivattt, I should note that you can use the
ANSIWriterorTranslateANSIto translate ANSI escape codes to style tags.