-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
24-bit true-color RGB escape codes in iTerm2 #154
Comments
Interesting. So I use iTerm 2 on macOS and it correctly records and replays 24-bit colors for me. |
Using colon instead of semicolon for rgb value separators is something I haven't seen so far. I can't watch the recording you linked because it's now been archived, so not sure what program you run in your recording session that produced these colons. |
I ran:
And got this file: https://asciinema.org/a/IdqatKnlBkVhgpGNUVjmKnkIy Which plays back in full color locally, but not on the web. Setting Possibly interesting thing: this does work if I run |
This problem seems to be very unusual and likely related to your specific setup. I'm going to close it, but we can revisit if another poor soul stumbled upon something similar. |
I ran across this issue as well. Colon separated is the preferred method by nearly ever terminal I've encountered. |
Yeah, I take back what I said earlier. We gotta fix it indeed. |
I need to solve asciinema/avt#9 for this first. |
I took a look at the code, I'm not much of a rust person so it would take me quite awhile but you can look at alacritty's implementation. I think it's best to use the Params struct with subparam handling. That makes it easy to handle things like:
Vs
(Note the double colon for the colorspace attribute, which is often missing) |
Thanks. I'll take a look at their impl. |
I recently created distinct |
This has been fixed in 3.8.0 - https://github.com/asciinema/asciinema-player/releases/tag/v3.8.0 |
For some reason, when using iTerm2 on macOS, RGB escape codes are colon-separated instead of semicolon-separated.
But asciinema-player doesn't know how to parse those, so if you're recording 24-bit color on a mac, you can't play them back with asciinema-player. Here's an example that works great in iTerm2 (and thus local
asciinema play
back), but that does not work with asciinema-player:https://asciinema.org/a/DXFd3EAnipwXA2MggYkNhX24g
You can workaround this by creating a custom
terminfo
database and forcing it to use semicolons, as demonstrated here:https://stackoverflow.com/questions/14672875/true-color-24-bit-in-terminal-emacs
iTerm2 will still render and display the semicolon-separated escape codes correctly, so there doesn't seem to be any downside to doing this, but it's unfortunate that asciinema-player doesn't work out of the box for 24-bit color recordings on a mac. (And this problem was... very difficult to diagnose.)
The simple fix would be to support either colon-separated and semicolon-separated escape codes in asciinema-player. But I don't really understand... anything about this. So maybe that's not the right thing to do.
The text was updated successfully, but these errors were encountered: