-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Most of the theme colors are broken for me #1269
Comments
You can fix it by using the GUI version. Most themes are borked in terminal, don't know why. |
put |
@ericting My terminal is already set as |
@ahmedelgabri can you open a helm-color buffer with |
@syl20bnr I can see 100 colors |
It should be 100 because Helm is limited to display 100 candidates. However, it means that you have 256 colors. Maybe you should give Zenburn a try? Or use stock Terminal app in OS X rather than Iterm 2 to see if there's any difference? |
@tuhdo The same is happening on the terminal.app. Only Zenburn I don't like it and Monokai are the only ones that are working fine most of the rest if not all are broken. |
Even Solarized look ugly? So I think probably your terminal and Emacs works fine, it's just that the themes are not well supported in terminal. Monokai actually defines another set of colors for terminal version. |
@tuhdo Yeah even Solarized. Other than this everything looks like working well. |
I have this issue as well! Tried re-installing emacs and that didn't work (iterm2 + the default terminal.app). For now I guess we're stuck with the GUI version. |
Same issue here in both iTerm 2 and Terminal. Also the powerline is messed up even when I use a powerline patched font. I've set my iTerm 2 font to Source Code Pro with the "Report Terminal Type" option on all possible settings. I tried running emacs-24.5 also with the commands suggested above. Using the GUI version isn't a great option for me. |
In the terminal you can only get one of the 256 colors listed here. This means that if the theme does not take care the colors set by the theme will go to the nearest color in terms of distance in color space. AFAIK the only solution is to choose a theme with terminal support. |
@cpaulik is there any port of solarized vim terminal theme for emacs? |
I don't know why but the themes-megapack uses http://melpa.org/#/color-theme-sanityinc-solarized which does not seem to support color degradation properly. http://melpa.org/#/color-theme-solarized on the other hand seems to handle this issue well @syl20bnr Any reason for choosing the one over the other? |
It looks like someone got 24 bit color working with vim using a nightly build of iTerm 2. I don't know how to adapt this to spacemacs though. |
That's neat I didn't know iTerm supported that. There's 24 bit patched formulae for tmux and emacs here: |
I'm already using iTerm nightly and that screenshot was from an iTerm nightly build. |
Although it does support more colors and that fixed my issues when I use vim with base-16 but apparently not working with Emacs. |
@cpaulik the solarized version used in spacemacs is bbatsov's one. I just realized that we could create a new dotvariable for spacemacs |
@ahmedelgabri you have to use both the right iTerm and a patched emacs. See the link I posted. |
@syl20bnr ah ok. From a quick glance at the source code of this version it seems that it also does not have terminal support. So we could add this version of solarized to the themes-megapack but how many different solarized themes do we want to have in spacemacs? |
Why does the current solarized theme work in the GUI emacs but not with true color in iTerm 2? Can we patch emacs or spacemacs so that it thinks iTerm is the GUI? |
@madmod Did you see the link I posted to a patched emacs that does exactly that? |
@trishume was on my phone so I didn't check the link. Checked it now, but why do we need to patch Emacs while it seems as other mentioned that the problem might be the themes themselves? |
@trishume sorry I missed that. After running the following commands in the latest nightly build of iTerm 2 I have 24 bit color working with the sublime-dark theme! First I had to uninstall my previous version of emacs and then install the patched version. brew uninstall emacs
brew tap choppsv1/term24
brew install choppsv1/term24/emacs Also for anyone interested this is a fast way to install the nightly version of iTerm2. By default casks will install to brew tap caskroom/versions
brew cask install iterm2-nightly Then run emacs with the flag mentioned here. ITERM_24BIT=1 emacs The last thing I need to figure out is how to fix the bad characters at the bottom. I have iTerm set to use Source Code Pro for both the ASCII and non ASCII font. Other minor things not working for me:
|
Actually I think the idea of having a separate variable for terminal theme is nice. @syl20bnr do you have plans to implement that? |
@ethanluoyc unfortunately I don't think this is possible because it will break with Emacs started as a daemon. |
My currently best working setup (solarized dark in terminal, through ssh, in tmux, using daemon + client): http://termbin.com/groe |
Why not just use TRAMP vs ssh'ing in? |
The problem is that Tramp can have lots of bugs sometimes. On Thu, Jul 7, 2016 at 4:25 PM +0800, "robbyoconnor" [email protected] wrote: Why not just use TRAMP vs ssh'ing in? — |
@robbyoconnor: I am personally looking for Spacemacs to be my Vim replacement. I'd like to be able to take a cheap chromebook, and ssh to my dev box and use Emacs instead of Vim, instead of trying to install emacs on my chromebook etc. The fact that command line is a second-class citizen in emacs is a great pain for me, since I already spent so much time altering my habits, I can clearly see that emacs is more powerful than Vim, and I really like Spacemacs features and SPC leader, but then problems with solarized theme, and display corruptions in tmux are ruining the experience. :( |
@cpaulik your fix works beautifully, but not with emacs as daemon and connecting with emacsclient. Do you have any idea of how to fix it? |
@abnerf have you tried https://github.com/sellout/emacs-color-theme-solarized#all-versions ? I guess you want to set the theme when a new frame is created. |
@abnerf : I use setup with combination of gnome-shell with dark solarized, tmux, ssh, spacemacs in client + daemon mode and it works for me quite well now.
|
@domi91c did you ever figure out why tmux was pure black / white? I'm having the same issue. |
The best workaround I found is to add this line in my ;; Colortheme fix in terminal
(custom-set-faces (if (not window-system) '(default ((t (:background "nil")))))) While still not perfect, the result is acceptable to me. |
@yogsototh I've expanded on that a bit to allow
using urxvt on linux I was getting correct colors in gui, dark blue background in terminal. Above gives more or less correct colors in both. |
@markschultz -- do a PR to fix this for others -- or document it someplace... |
@yogsototh's solution works to fix colors in iTerm, but eventually breaks @markschultz's solution doesn't fix it for me. |
Yogsototh's solution worked for me, but in both the terminal and gui, the background of the mode/buffer number indicator on the left of the powerline is now no longer colored, with the exception of the powerline separator character. No other theme does this. Any idea what causes this and how to fix it? |
I know that there was work done on the base16-themes to default to using your terminal colors, so the should no longer be an issue with this. |
For those using tmux the answer here fixed my weird color issues. TL;DR |
So, I finally got @sellout's emacs-color-theme-solarized to work with the These are the steps: Step 1:Set up a Solarized color scheme for your terminal. For urxvt, the Step 2:In your (defun dotspacemacs/layers ()
(setq-default
...
dotspacemacs-excluded-packages '(solarized-theme)
dotspacemacs-additional-packages '(color-theme-solarized)
...
)) And by the way, you should also remove any Step 3:The theme loading mechanism for (defun enable-solarized-in-terminal (frame)
;; cf. http://philipdaniels.com/blog/2017/02/spacemacs---configuring-the-solarized-theme/
(unless (display-graphic-p frame)
(set-frame-parameter frame 'background-mode 'dark)
(set-terminal-parameter frame 'background-mode 'dark)
(spacemacs/load-theme 'solarized)
))
(defun enable-solarized-in-gui ()
(mapc 'disable-theme custom-enabled-themes)
(setup-solarized-theme)
(spacemacs/load-theme 'solarized)
)
(defun setup-solarized-theme ()
;; I like a transparent background in the terminal
(custom-set-faces
'(default (
(((type tty) (background dark)) (:background "nil"))
)))
;; The frame number indicator has some problems with inverse video
(set-face-inverse-video 'spacemacs-motion-face nil)
(set-face-inverse-video 'spacemacs-insert-face nil)
(set-face-inverse-video 'spacemacs-normal-face nil)
(set-face-inverse-video 'spacemacs-visual-face nil)
(set-face-inverse-video 'spacemacs-replace-face nil)
)
;; For GUI clients, after-make-frame-functions is messed up (probably it is
;; called too early), and some colors are messed up. For terminal clients on
;; the other hand, it works perfectly. The background-mode is necessary for
;; terminal clients, but (apparently) not for GUI clients, and has to be set
;; for each frame individually.
(spacemacs|do-after-display-system-init (enable-solarized-in-gui))
(add-hook 'after-make-frame-functions 'enable-solarized-in-terminal) ExplanationThe difference to @yogsototh's and @markschultz's approach for disabling the background for terminal clients is basically not to change the |
Is this still an issue? |
@fiveNinePlusR This needs to be fixed on a theme-by-theme basis. The base16 themes are the only ones I can directly speak for, but they should be fine. |
@fmthoma Your solution worked for me, not only I got solarized to finally look the way it's supposed to look but also any other theme looks good now in GUI mode, thank you! |
I am not using spacemacs, but I also had issues with bbatsov's Solarized themes when running emacs in the terminal. After a while of searching for possible solutions (which also led me here), I finally found a solution that worked for me, by using a custom terminfo description Now I no longer get that blue background when I use the solarized-dark theme. Maybe this also works with spacemacs? |
There's a guide for turning on 24bit in a terminal here: https://github.com/syl20bnr/spacemacs/wiki/Terminal |
@sdwolfz It works for me, thanks so much!! I'm using ir-black theme. |
IMO this issue is resolved through the wiki. |
Here is a screenshot trying to use
base16-ocean
themeMonokai is the only one that is working nicely, how can I fix this? I'm using iTerm2
The text was updated successfully, but these errors were encountered: