Skip to content
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

foreground colors incorrect #94

Closed
losingkeys opened this issue Feb 26, 2013 · 18 comments
Closed

foreground colors incorrect #94

losingkeys opened this issue Feb 26, 2013 · 18 comments

Comments

@losingkeys
Copy link

Using solarized dark, I see these colors instead of the colors on the second window below:

I know you're still working on the background colors, but shouldn't the foreground colors match? Here are the hex values, for reference.

@losingkeys
Copy link
Author

I think this has something to do with $TERM and whatever terminal (emulation?) asciiio uses. I'll try to look into it today :)

@losingkeys
Copy link
Author

hmm, tput colors reports 256 and $TERM is the same that I'm using normally. Is it possible the escape sequences are wrong/different or the html terminal doesn't support 256 colors? I thought it did, but maybe there's something else wrong...

@ku1ik
Copy link
Contributor

ku1ik commented Sep 22, 2013

Could you guys check if it is correctly displayed now?

@losingkeys
Copy link
Author

Same issue for me. Recorded a new video to compare to the old one, just to be sure.

@ku1ik
Copy link
Contributor

ku1ik commented Oct 6, 2013

Do you maybe use custom terminal colors (.Xdefaults/.Xresources) or is it just 256 colors version of the theme running in 256-colors enabled vim?

@losingkeys
Copy link
Author

I use xresources-solarized and the solarized colorscheme for vim in urxvt.

@ku1ik
Copy link
Contributor

ku1ik commented Oct 8, 2013

@JoshuaRH so this is the reason. You have custom color palette asciinema knows nothing about. There are 2 ways to handle this.

A: try getting the rgb values for all 16 colors from terminal (like @oblique demonstrated here https://github.com/oblique/configs/blob/master/.zsh.d/get_term_rgb_color.py). This works on Linux, but on OSX, and also doesn't work under gnu screen. So it's not really complete option at the moment.

B: add several color schemes to asciinema and allow users to choose their favorite per profile or per recording.

C: allow users pasting their terminal color scheme (in .Xresources format) on their asciinema profile edit page. The player would pick up the colors from profile or fallback to default xterm-like scheme. This would solve your issue with solarized too.

D: not doing anything about it.

The solarized case is kind of special. AFAIK you can get solarized in vim in 2 ways: by using 256-color version of vim scheme (which has approximation of actual solarized colors) or by adjusting colors of your terminal and using 8/16 colors vim scheme (with exact solarized colors). You are doing the second thing, I was once doing the first thing. If we added solarized support (using any of the above methods) this could lead to confusion and bug reports (unless we would add support for these 2 solarized variants and make it very clear to the user he/she HAVE TO choose the proper one).

@sigmavirus24
Copy link

I'm not opposed to putting the burden on the user so long as it is clearly documented and relatively simple for them to do. If the process is undocumented or not human friendly then it would make more sense for asciinema to do the hard work.

@losingkeys
Copy link
Author

Hmm.. I wonder if that script could be tweaked to support OSX/Screen. It's comparing color escape codes (iiuc), couldn't we use terminfo or tput to get those more reliably? I'll play with it a bit and let you know if I figure it out.

@ku1ik
Copy link
Contributor

ku1ik commented Oct 8, 2013

The research for the stable method for getting the real terminal colors continues here : https://github.com/sickill/asciinema/issues/11

@losingkeys
Copy link
Author

@ku1ik
Copy link
Contributor

ku1ik commented Jun 30, 2014

@losingkeys does this look good now? ;) https://asciinema.org/a/2214?theme=solarized-dark

@losingkeys
Copy link
Author

@sickill yep! works like a charm :)

@ku1ik
Copy link
Contributor

ku1ik commented Jul 1, 2014

@losingkeys you can set your default theme to Solarized in your account settings, and you can override it per asciicast in asciicast edit form.

@losingkeys
Copy link
Author

Nice. That's cool that I can override it and pick a default for new
recordings. However those settings (both user-specific and
asciicast-specific settings) don't seem to stick.

On Tuesday, July 1, 2014, Marcin Kulik notifications@github.com wrote:

@losingkeys https://github.com/losingkeys you can set your default
theme to Solarized in your account settings, and you can override it per
asciicast in asciicast edit form.


Reply to this email directly or view it on GitHub
#94 (comment)
.

@ku1ik
Copy link
Contributor

ku1ik commented Jul 2, 2014

@losingkeys your account is missing email address, you can either set it manually in account settings form, or you can log out and log in with email (+ choosing Twitter login as a second step to migrate the account).

@ku1ik
Copy link
Contributor

ku1ik commented Jul 2, 2014

@losingkeys actually there was a bug, which is now fixed ;) Also I thought that your asciinema account is named "inyourdom", but I see there's "loosingkeys" too :)

@losingkeys
Copy link
Author

Yeah that's an old username :P. It works now though, thanks again!

On Wednesday, July 2, 2014, Marcin Kulik notifications@github.com wrote:

@losingkeys https://github.com/losingkeys actually there was a bug,
which is now fixed ;) Also I thought that your asciinema account is named
"inyourdom", but I see there's "loosingkeys" too :)


Reply to this email directly or view it on GitHub
#94 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants