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

Terminal background colors issue #2

Closed
dakrone opened this issue Dec 25, 2013 · 6 comments
Closed

Terminal background colors issue #2

dakrone opened this issue Dec 25, 2013 · 6 comments

Comments

@dakrone
Copy link

dakrone commented Dec 25, 2013

Is there a way to get the background to be the same for the terminal as the GUI?

GUI Screenshot: http://i.imgur.com/eWrjUTe.png
Terminal Screenshot: http://i.imgur.com/9Cir5LA.png

@ozanmakes
Copy link
Owner

Unfortunately I don't think this is possible under a 256 color terminal (see M-x list-colors-display), although I'd love to be proven wrong.

Maybe this could be worked around by falling back to ANSI colors and asking users to set their terminal emulator's colorscheme by applying a provided Xdefaults/.itermcolors, but I'm not sure it would be worth the effort.

ozanmakes added a commit that referenced this issue Dec 25, 2013
This change hopefully fixes terminal background color issues by falling
back to more tolerable background colors when running under a 256 color
terminal (see #2).
@ozanmakes
Copy link
Owner

Just pushed a workaround for this. The Emacs version I'm using, emacs-mac-port, doesn't allow connecting to servers created by GUI Emacs from a terminal instance and vice-versa, so I can't test if the fix works in that case (it might even break the theme when doing the opposite) so please let me know if it works for you or if you have a better idea.

@dakrone
Copy link
Author

dakrone commented Dec 26, 2013

It's closer, but kind of makes org-mode files look very ugly right now :)

See: http://i.imgur.com/MTOe6kO.png

@ozanmakes
Copy link
Owner

Sorry for the delay, please let me know if you spot any other issue.

@dakrone
Copy link
Author

dakrone commented Jan 5, 2014

Seems to work; thanks!

@freehck
Copy link

freehck commented Jul 26, 2022

@osener

Have just tested afternoon-theme on classical Emacs 28.1 in daemon mode.

This fix doesn't work. As you correctly noted it definitely breaks the colors when you use terminal and GUI emacsclients at the same time as theme colors are evaluated to different values for different frames. And theme colors are global across the frames.

When I start the GUI emacs daemon it's >256 colors. So when I attach a terminal emacsclient (iterm2, 256 colors) to the daemon, I see blue background. If I load theme from it, the colours will be normal. If I attach then a GUI emacsclient and load the theme from there, I will immediately turn the background colour of all the terminal emacsclients back to blue.

PS: I'm not going to test it anymore. I just keep you informed that the problem still exists (despite the fact it was closed in 2014).

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