purcell / color-theme-sanityinc-solarized

A pair of Emacs color themes based on Ethan Schoonover's 'solarized' theme
83 stars 20 forks source link

Background color incorrect in some terminals #16

Open PythonNut opened 9 years ago

PythonNut commented 9 years ago

This theme seems to suffer from a similar issue to bbastov/solarized-emacs #18. In particular, the background face is a bright blue, when the theme is loaded in a terminal. For example, here is a screenshot of emacs -Q in a GNOME terminal.

color_theme_sanityinc_dolarized_dark

I can reproduce s similar result in xfce4-terminal. In contrast the canonical vim solarized theme colors the background a dark grey, although I don't necessarily agree with some of the other color choices. selection_003

purcell commented 9 years ago

This is probably a rounding issue: we only specify full sRGB colour values, but the terminal will quantise those colours into its palette of 16 or 256 colours. Or perhaps Emacs does that quantisation, and that's what causes the clumsy rounding. In any case, I see the same behaviour on my own machine, in iTerm on OS X.

The solution would probably be to extend the theme with 256-colour-palette definitions for all the colours, but that's a lot of work and I'm unlikely to do it in the near future.

localredhead commented 9 years ago

Hello - I think this can be mitigated by installing a solarized-dark theme for iTerm2 itself. This is the only way I got semi-accurate solarized-dark in the terminal.

I should note that the solarized-dark in this manner was still slightly too dark but it was manageable.

cpaulik commented 8 years ago

What about introducing a setting that would make this compatible with a terminal configured to use the 16 solarized colors?

purcell commented 8 years ago

@cpaulik How would that work?

cpaulik commented 8 years ago

Take a look at https://github.com/sellout/emacs-color-theme-solarized/blob/master/solarized-definitions.el They use brightblack for base03 and so on if solarized-termcolors is set to 16 and emacs is started in a terminal. So in this theme you could introduce a variable like solarized-termcolors that then uses the 16 standard terminal color names that you already have in your list