Replies: 1 comment
|
Your workaround highlights why A first-class implementation would be safer if underline color were modeled like foreground/background color in So I would avoid relying on |
|
Your workaround highlights why A first-class implementation would be safer if underline color were modeled like foreground/background color in So I would avoid relying on |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Underline colors are supported in at least Kitty, Ghostty and Mintty and are a requirement for a complete implementation of the terminal graphics protocol. Since you can't simply add the ANSI codes part of your
Segmenttext, it's much more work to implement this part of the protocol in Rich (and might not be possible using public APIs?). This affects libraries such as textual-image.For the protocol to be implemented cleanly, it would also need to be possible to set a highlight color without actually enabling an underline/specifying an underline style.
In case this helps someone, I eventually managed to get an implementation that works in both Rich and Textual (and could be extended for other unimplemented/unsupported ANSI codes):
All reactions