-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for 24-bit color #649
Comments
No fundamental objection to supporting this, but what terminfo entry are these in? Right now the What TERM can |
This is all quite doable, but there are issues to work through: This adds a fourth set of rendering attributes to character cells (VT100, 16-color, 256-color, true-color). Since Mosh is a virtual terminal that uses an unknown real terminal for its final rendering, I think it has to maintain and pass through all four sets of attributes. 16-color attributes can't be converted to RGB because different terminals choose different colors, often user configurable. 256-color attributes could be converted to RGB, but I think performance and compatibility issues will weigh against that. I'm a bit concerned about performance. Adding support for this will add 6+ bytes to each Terminal::Framebuffer::Cell, but more importantly, the escape sequences are verbose (14 characters minimum to set just foreground or background, 21 to set both). We will want to pass as few of these as possible. 256-color attributes are a third shorter than this and should be passed as such. Implementation for this will touch the same code as my upcoming performance changes. What do we do with a terminal emulator that doesn't support true-color mode? Passing this stuff through to a truly ignorant terminal will result in RGBake (you get the right characters, tossed in a fruit salad of colors/attributes). We can either ignore the problem, or we can do truecolor detection similar to Mosh's existing 16/256-color detection. If we don't implement this soon, we should at least implement detection of these sequences so that we properly ignore them. https://groups.google.com/forum/#!msg/iterm2-issues/NXLGvwuzjrc/35gVs4pfjLYJ has a fair bit of relevant commentary. |
I spent a while gnawing on this last night. It's complicated, and I found we're not currently fully/correctly supporting 256-color attributes, either. Turns out that X3.64 and friends are extremely vague in this area and so XTerm initially misimplemented them for 256 color attributes (and the full-color attributes extend on that code and work the same way). So XTerm supports 3 ways to do 256-color attributes:
Full-color modes work the same way, with two extra (sub)parameters. And of course, we should properly process or ignore these. All of these schemes suck in one way or another, and handling the 6 possible types of sequences sucks more. Currently, we only support semicolons. I suspect that in practice, the colon-delimited modes are rarely if ever used for 256-color attributes, because of XTerm's initial misimplementation (which went unrecognized for a decade, I think) and other terminal emulators copying it initially. We don't seem to have had trouble from this. I'd hope to think the same is true of full-color attributes but I don't know. More useful commentary: |
+1 for mosh supporting true colors. I hope mosh can be in the hall of fame in https://gist.github.com/XVilka/8346728. |
+1. I've stopped using |
+1. mosh has great terminal emulation it would be delightful to have 24-bit color be part of that. |
Looks like this didn't land in the performance update? It seems to me like just handling the semicolon case will put mosh on an equal playing field as many other terminal emulators, but handling all three cases would put it above and beyond. Getting 24bit color support to land in mosh would be excellent, I am another user that am feeling the pain after neovim adopted true color, I consistently need to switch colorschemes depending on if I am using ssh or mosh. |
I've been playing with Mosh and it looks amazing - any idea when true color will be supported? |
I'd like to add my 👍 to finding a way of integrating 24bit colour support. It's not a deal breaker, but when using something as awesome as Mosh, it's nice to have all the toys too! 😄 |
Any news about this? The lack of truecolor support doesn't only mean that the color is approximated to the nearest color in a 256 color palette, I'm just getting seemingly random, very bad colors... Thank you! |
This would be very nice. Edit Come on, even Windows has truecolor support now... :) https://blogs.msdn.microsoft.com/commandline/2016/09/22/24-bit-color-in-the-windows-console/ |
Can the issues that need to be worked through be created and referenced here? I'm not an expert at terminal emulators, but I would gladly bite into smaller issues to help support true color in mosh :) |
ping? any news about this feature? |
This was added in #939. |
To anyone who's been waiting for this feature: it would be really awesome if you could build the latest master version of mosh and help test it out! |
IIRC, I've already reported on IRC that it works like a charm! // well, at least, I didn;t still catched any color-related bug |
Compiled from |
Build at RHEL6, connect from iTerm2 and use with tmux. Neovim. Everything
looks great!
… IIRC, I've already reported on IRC that it works like a charm!
// well, at least, I didn;t still catched any color-related bug
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#649 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAv6Uvz6xCmzD4o8U18CuVc6wsafK_iks5szy0ngaJpZM4FXYVV>
.
|
It worked for me! Even when I started a tmux session on the remote. Much kudos to all who made it happen! |
Ah sorry, was on mobile. Thank you. Blink shell doesn’t support yet but I’ve mentioned that it’s possible now. Thanks! |
I can't get true colours to work at all on High Sierra:
The following images are connections vis ssh and mosh to a tmux session: Do I have to change TERM to something specific? Thanks :-) |
doh, of course, I only compiled the client end - how embarrassing :-( Now it's working :-) Thanks for the great work! |
What version is needed? It doesn't work for me with version 1.3.2 on both ends. |
You need to build it from git yourself. There have been no releases for years, so none of them include true color support. |
@makeworld-the-better-one I have been installing with |
On Fedora you can use https://copr.fedorainfracloud.org/coprs/agriffis/mosh-nightly/ |
Can we have a new release. I've been waiting for years :) |
Lots of terms and related programs are gaining support for 24-bit color escapes, see https://gist.github.com/XVilka/8346728
I'd love to see support for this in mosh. Creating this issue to gather information on what's needed in mosh, and to coordinate any effort around it.
The text was updated successfully, but these errors were encountered: