Replies: 26 comments
-
also some programs can change there colors, for example cmatrixreloaded |
Beta Was this translation helpful? Give feedback.
-
I tried your script but I get following error:
|
Beta Was this translation helpful? Give feedback.
-
the script works in python3. for python2 change the line to: |
Beta Was this translation helpful? Give feedback.
-
I was thinking about sth like this for some time. Thanks for bringing this on. |
Beta Was this translation helpful? Give feedback.
-
I haven't looked into it... but maybe something from here? (originally form this stackoverflow answer) |
Beta Was this translation helpful? Give feedback.
-
It does work in gnome-terminal but it doesn't in konsole. |
Beta Was this translation helpful? Give feedback.
-
I found that with tmux you can forward console codes to the terminal and I modified my script https://github.com/oblique/configs/blob/master/.zsh.d/get_term_rgb_color.py |
Beta Was this translation helpful? Give feedback.
-
Sorry, I forgot to push my changes in ncmpcpp() and wicd-curses() functions, now it's updated. |
Beta Was this translation helpful? Give feedback.
-
I just checked it under urxvt, xterm, gnome-terminal and tmux. Only under gnome-terminal it's not working. At the moment I'm refactoring the recorder a little (here: https://github.com/sickill/ascii.io-cli/tree/split). Once I'm done with refactoring I'll try to use the code you provided here. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I don't know about Terminal.app or ITerm2, if they support color changing it will work.. |
Beta Was this translation helpful? Give feedback.
-
Just for the reference, I have also found this : https://github.com/dranjan/termcolors |
Beta Was this translation helpful? Give feedback.
-
It looks like https://github.com/dranjan/termcolors depends on Scratch that, I was wrong. @sigmavirus24 figured out that there was an issue with the tool passing -1*2 around as a timeout value instead of just -1. More investigation needed... but this might end up working. |
Beta Was this translation helpful? Give feedback.
-
Also note that when I tried this on OSX+iTerm2 it didn't actually pick up the term colors properly. So even with that fixed, it's still not the most optimal since the underlying C API that termcolors uses ( |
Beta Was this translation helpful? Give feedback.
-
So I worked on this with @sigmavirus24 and came up with this: https://gist.github.com/joshuarh/7904813. The following still needs to be done/checked:
|
Beta Was this translation helpful? Give feedback.
-
It doesn't seem easy to obtain the terminal's colorscheme. Instead, could we allow the user to specify her/his colorscheme in a JSON file ? If the implementation is done generically enough, it'll be a breeze to switch to any new technique to capture the terminal colors we'd discover later on. |
Beta Was this translation helpful? Give feedback.
-
It doesn't seem easy, but I'm not convinced that it's not doable. I think we can record the escape codes, we just need to convert those back to xterm colors. OTOH, if we allowed users to specify which colors they wanted, that brings up interesting possible features and bugs. We could let people choose which scheme they want to see when browsing, but depending on the foreground colors that were recorded, this could be a problem (for instance, here's the default theme with solarized foreground colors in fallback mode: https://asciinema.org/a/2214). |
Beta Was this translation helpful? Give feedback.
-
What I really meant is that it should be to the uploader to specify the colorscheme. As to the rest, I don't know and I'm not really able to judge. |
Beta Was this translation helpful? Give feedback.
-
@losingkeys we ARE already recording the escape color codes. The thing is they are just single numbers like 1, 2 or 3. They mean red, green and yellow. And so on. People use different color schemes in their terminal but most of the schemes are close to the "original" xterm colors so it looks "ok" in majority of cases. @losingkeys Allowing the user to specify his color scheme (let's say in .Xresources format) is an easy thing to do and I'm considering doing just that. So if you use solarized or some other terminal theme that completely alters the meaning of each color it's gonna be a solution for wrong colors. @mrabault the ideal solution would be to use recorder to detect and upload terminal scheme, yeah. But we haven't found (yet!) a good enough solution that would work for majority of terminal emulators across different OSes. |
Beta Was this translation helpful? Give feedback.
-
Has there been made progress in this regard, e.g. on the go branch? |
Beta Was this translation helpful? Give feedback.
-
@blueyed no progress so far. Querying |
Beta Was this translation helpful? Give feedback.
-
@blueyed btw, you can change a theme for your asciicasts, either account-wide (on your account settings page) or per asciicast (on asciicast edit page). For ex this is your asciicast in solarized-dark: https://asciinema.org/a/13855?theme=solarized-dark |
Beta Was this translation helpful? Give feedback.
-
This would be a killer feature! |
Beta Was this translation helpful? Give feedback.
-
We're discussing version 2 of asciicast format in asciinema/asciinema#196, and I think adding optional As for the actual technique, this issue is very old one and the linked solutions seem to be gone. I wanted something that works on all platforms, and I was hesitating to settle on non-100% working solution. Now I think it's better to just support what we can now, treat the Anyone with something working on Python 3.3+? |
Beta Was this translation helpful? Give feedback.
-
@timofonic please never again just mention literally everyone who has been in contact with a repository. I'm not even a contributor here and I wouldn't have any "news" for you. As an aside, if anyone had "news" on this - or the other 2 issues you mentioned myself and many others on - it would have been posted here as either a comment or a pull request that closes this issue. If you don't see anything relevant to the issue, assume that there is "no news" for you. |
Beta Was this translation helpful? Give feedback.
-
@timofonic die in hell |
Beta Was this translation helpful? Give feedback.
-
Capture of the original terminal theme has been implemented in asciinema/asciinema#617, which will go out with the upcoming 3.0 release 🎉 |
Beta Was this translation helpful? Give feedback.
-
you can get the colors with some console codes.. i wrote an example here https://github.com/oblique/configs/blob/master/.zsh.d/get_term_rgb_color.py
screen, tmux, and virtual console do not support this operation.
Beta Was this translation helpful? Give feedback.
All reactions