sellout / emacs-color-theme-solarized

Emacs highlighting using Ethan Schoonover’s Solarized color scheme
http://ethanschoonover.com/solarized
MIT License
1.15k stars 201 forks source link

Theme Color Mismatch #71

Closed cfebs closed 9 years ago

cfebs commented 11 years ago

I have recently started to check out emacs, but I cannot seem to get solarized to work properly. I have done a ton of googling, but I cannot figure this out.

I am using:

I have been using the Vim themes for some time now without issue:

vim

That's using the same putty setup and everything, looks perfect

But here is what my emacs looks like:

emacs

Both these are with the shell test file from the solarized repo.

Here is my day old .emacs file: https://gist.github.com/3732955

Emacs 24

Following the instructions (add to custom load path, load theme), I arrive at the same exact screenshot as 23.

I can't figure out what I am missing. It works well in vim so it must not be the terminal settings. Is there some extra emacs config that I am missing?

Thank you for the help,

ramLlama commented 11 years ago

I am also having the same problems on emacs 24.1.1. You can see my current .emacs.d at https://github.com/ramraghunathan/.emacs.d (I use el-get). I would love to see some insight on this issue.

lamberss commented 11 years ago

I am seeing the same behavior with emacs 24.1.1 in both gnome-terminal and xterm. Note that when running the emacs GUI version the color scheme matches the vim color scheme, its just the 16 color terminal theme that is incorrect. I have not checked the 256 terminal version.

sellout commented 11 years ago

@lamberss Can you tell me what the result of (display-color-cells) is? This may be a duplicate of #62.

lamberss commented 11 years ago

Okay, I get the following:

Debugger entered--Lisp error: (void-variable display-color-cells) eval(display-color-cells nil) eval-last-sexp-1(t) eval-last-sexp(t) eval-print-last-sexp() call-interactively(eval-print-last-sexp nil nil)

lamberss commented 11 years ago

Sorry, my bad. The result is 8.

lamberss commented 11 years ago

It probably is a duplicate of #62. I tried using TERM=xterm-16color and it worked fine.

ramLlama commented 11 years ago

I concur with @lamberss. I am using gnome-terminal 2.32.0. TERM is set to xterm by default, and the solarized theme is broken as specified. It works flawlessly for me when set to xterm-16color. So, that is probably all that needs to be set.

I will check this again at home, where I use roxterm, but I have a suspicion that setting TERM to xterm-16color will fix the issue

cfebs commented 11 years ago

When I set TERM to xterm-16color and try to start emacs, I get:

emacs: Terminal type xterm-16color is not defined

I'll do some googling to see how to set that up. I tried setting TERM to xterm-color, but got the same results

Also I do most of my work in screen, but this testing is all straight from the shell.

resynthesize commented 11 years ago

I have the same issue on iterm2/osx/emacs 24.2.1, even with xterm-16color set...would also appreciate any insight into how to fix this.

ghost commented 11 years ago

Same for me on iterm2 (xterm-256colors), OS X 10.7.5, emacs 24.2.1. Setting TERM to xterm-16color "fixes" the issue for emacs, but it messes with other apps color theme like tmux solarized. Any idea on how to fix this without the xterm-16color trick ?

(setting solarized in Vim was easier ;p )

ghost commented 11 years ago

Here is an almost-fix for using xterm-256color on OS X. I edited the column "256" of the var solarized-colors in solarized-definitions.el using the HEX values given by the correspondance table (HEX / color name) opened with the command M-x list-colors-display. If you check the result with a digital color meter, there will be a tiny difference between this hack and the original solarized theme, but at naked eyes, this seems ok.

Here is a screen capture (emacs on the left side, vim on the right side, both running inside tmux. Solarized set in iTerm2, Tmux, Vim and Emacs), as you can see, it is very hard to see a difference.

Hope this'll help ;)

emacs_solarized.png

zmanji commented 11 years ago

@M4N13K Did you publish your changes somewhere?

ghost commented 11 years ago

The changes appear in the screenshot, but I can post the modifed file this week end (I'm new to GitHub, did't take the time to figure out how everything works here yet).

ghost commented 11 years ago

I uploaded the files on my repo: https://github.com/M4N13K/misc/tree/master/emacs/emacs-color-theme-solarized

(Only edited solarized-definitions.el though)

naunga commented 10 years ago

I'm having this issue as well. OS X 10.8.5 iTerm2 1.0.0.20130624 emacs 24.3.1

I've tried setting TERM to xterm-16color did not help matters.

jinpoc commented 10 years ago

Any update on this? I still can't get this to work.

OS X 10.8.2 Terminal.app emacs 24.3

Tried: -- xterm-16color -- manually set from list-colors-display -- set solarized-degrade t -- solarized Terminal.app theme -- various other work-arounds (eg. leifwalsh, junag, etc.)

nickbroon commented 10 years ago

Duplicated of #62 ?

sellout commented 9 years ago

If (display-color-cells) returns 8, then you’re going to end up with a very limited color palette. To fix that, try setting TERM=xterm-256color, which should also attempt to use exact colors as of c677b269bb0c613e267ea27ab3154c7737cd6785.