16
votes

I have set my iterm2 to use the solarized color theme: terminal

I would also like to have emacs use this theme. Here's what it looks like: emacs

I have my terminal set to xterm-256color. I don't know what I've missed, but it makes me sad.

Help appreciated.

4
Just to check, is that paren match highlighting? What happens when you move point off that open paren on the first character of the first line to an empty line below? - Ross Patterson
Nothing happens (well, the cursor moves). - Alex R
I have the same issue with Putty on Windows. I get the same blue background. - Matthew Simoneau
Interestingly, I get the same blue-ish background for another dark theme that's supposed to look totally different (using iTerm2) - ctietze

4 Answers

11
votes

It turns out that the official (or officially endorsed) soliarized git repo has a version that is less good than this one.

I switched to the latter and it fixed the issue.

3
votes

You want to use the default background color set in iTerm2 itself. The problem is, you also have emacs setting the default background color (which overrides iTerm's default)!

If you remove the command changing the background color, it should return to iTerm2's default.

You most likely have something like the following in your .emacs:

(custom-set-faces  '(default ((t (:background "blue"))) t))

To use the Terminal's default background color, do not set the ":background" attribute at all. Note that setting it to black will NOT always work correctly (though in your case it probably will)!

I use gnome-terminal with transparency, and setting the default ":background: black" made the window completely opaque. I had to remove the ":background" setting in order to get my transparency back.

You can still set the default ":foreground" attribute and it will work; just don't set ":background" (did you get that? maybe I should repeat it again. :) ) so you keep your Terminal default background!

2
votes

Use only the solarized theme in your iTerm configuration and not in your console emacs.

0
votes

For me the problem was having a gaudy dark green background colour on terminal emacs:

dark green background colour is wrong

I fixed it by changing the background colour from #272822 to #222222. For some reason iTerm2 and/or command line emacs/aquamacs changes the very mildly green background colour into gaudy dark green hue.

(custom-set-variables
  '(default-frame-alist
      '((background-color . "#272822")
        (background-mode . dark))))