I'm using solarized theme in emacs-24.3. While I'm quite happy with it generally, the IPython shell is blindingly ugly. It is quite clear that the font colors within it are not using solarized values.

enter image description here

Is there a way to fix that?

  • Do you have ansi-color-process-output in your comint-output-filter-functions, and if so, what's your value of ansi-color-for-comint-mode? Dec 18, 2014 at 3:51

1 Answer 1


You'll probably do the greatest good for the greatest number if you open an issue on the github page.

In the meantime, Bozhidar's set up the code to enable customizing your own "child theme" of solarized. And if you find a customization that works well, you'll do even more good for the community when you update your issue with a pull request!

I'm going to assume you have ansi-color-process-output in your comint-output-filter-functions and that ansi-color-for-comint-mode is t, because that's the default setting that ships with Emacs. If you have a different setup, let me know.

The colors you're seeing are coming from IPython's interaction with the terminal. Emacs is scooping up control sequences and turning them into color overlays. To change how Emacs turns control sequences into colors, you want to customize the variable ansi-color-names-vector. Note that this change will affect everything based on comint-mode, not just python-mode.

Because I don't use solarized, I would customize that variable the naive way with something like the following in my init file (Emacs 24.3 syntax):

; Change the color names to suit your taste.  Hex color codes are allowed.
; Check the theme definition file for ideas.
(eval-after-load "solarized-dark-theme"
    '(ansi-color-names-vector ["black" "red3" "green3" "yellow3" 
                               "blue2" "magenta3" "cyan3" "gray90"])))

Alternatively, because Bozhidar is awesome, it looks like you can customize a "child theme" with something like the following in your init file, then use my-solarized-dark as your custom theme. (Note - completely untested code.)

(deftheme my-solarized-dark "Like stock solarized-dark, but with a different ANSI color vector.")
(create-solarized-theme 'dark 'my-solarized-dark 
                        (lambda ()
                          '(ansi-color-names-vectors [...])))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.