Sirex
Sirex

Reputation: 305

Emacs solarized theme issue

I've started to use emacs (about few days). Also I read this topic: Color themes are strange/incorrect in terminal emulator but I still have issues.

What I did:

  1. export TERM="xterm-256color"
  2. Download and successfully installed color-theme package
  3. Download and successfully (I think) installed solarized theme from https://github.com/sellout/emacs-color-theme-solarized.git
  4. updated init.el:

    ;;; ============= SOLARIZED ================
    (add-to-list 'load-path "~/.emacs.d/color-theme")
    (add-to-list 'load-path "~/.emacs.d/color-theme/themes")
    (require 'color-theme)
    (color-theme-initialize)
    (setq color-theme-is-global t)
    (add-to-list 'load-path "~/.emacs.d/emacs-color-theme-solarized")
    (require 'color-theme-solarized)
    (setq solarized-termcolors 256)
    (color-theme-solarized-dark)
    

OS: Debian/KDE4.7/Konsole

Emacs Screenshot

Some color are wrong: 1. include 2. numbers 3. def 4. quotes "

Why this theme displays wrong?

Upvotes: 3

Views: 4625

Answers (1)

J.C. Yamokoski
J.C. Yamokoski

Reputation: 1014

If you are running Emacs from a terminal make sure that your terminal emulator's colorscheme is also set to use the Solarized palette. Reference: https://github.com/sellout/emacs-color-theme-solarized#important-note-for-terminal-users. There is no palette for Konsole in the official Solarized repo, however, there are others available such as this one: https://github.com/phiggins/konsole-colors-solarized.

If that still doesn't work, you can try explicitly setting your terminal to use 16 colors like so:

$ TERM=xterm-16color emacs

I don't know enough about terminal colors to explain how and why this works but I can confirm that it does. This might help explain things a bit if interested: https://github.com/seebi/dircolors-solarized#understanding-solarized-colors-in-terminals.

Upvotes: 3

Related Questions