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

Color issue in terminal with solarized-dark #30

Closed webframp closed 12 years ago

webframp commented 12 years ago

From Issue #27 it seems like others have had issues with solarized in a terminal, but I couldn't tell if anyone has seen this exactly. Colors work nicely when using cocoa emacs, but not when using emacs in the terminal although the terminal does support 256 colors from what I can tell, I used (display-color-cells (selected-frame)) to check.

On Os X Lion, Using Terminal.app or iTerm2 and either Emacs 23.2a installed with homebrew or Emacs 24.0.90.1, from http://emacsformacosx.com/, Here's what the theme looks like for me:

color-theme-solarized-light, seems to work: Light Theme

color-theme-solarized-dark, has the wrong bg color: Dark Theme

What could be causing this? Is it best to just manually override the background color? It looks to me like the colors are displaying correctly when I run M-x list-colors-display

illusori commented 12 years ago

Your problem appears to be that it isn't choosing brightblack as your background colour, looking at the value for brightblack it's #7f7f7f as far as emacs is concerned.

solarized-dark tries to set your background to base03, which has hex value of #042028 (or something similar depending on the values in solarized-colors), emacs looks for what it thinks the closest match is, which isn't going to be #7f7f7f, so brightblack isn't used.

I've got a patch in Issue #22 to keep emacs in sync with the real values of the terminal colours, it may work for you.

If that doesn't work you could try looking at which column of solarized-colors is being used, if you can trick it into using the 4th column "ANSI (Solarized terminal)" it may work. (Setting solarized-termcolors to 16 should make it use the 4th column in emacs -nw.)

sellout commented 12 years ago

Hopefully this issue is fixed. Please reopen issue #22 if it's still an issue.