[IPython-User] Customising ipython colors

Neilen Marais nmarais@gmail....
Fri Feb 25 11:15:29 CST 2011


Neilen Marais <nmarais@gmail.com> writes:

> Hi,
>
> I'm using ipython (0.10.1) in emacs with ipython.el. I'm having some trouble
> getting a colour scheme that works though. I prefer to use a light-grey
> background in emacs rather than the default white, but unfortunately
> both the "Linux" and "LightBG" colour themes use bright green in
> bactraces. This colour is very hard to read against a light grey
> background.
>
> So, I'd like to define a custom color scheme that works for me. If
> someone could point me in the right direction I'd be more than willing
> to set up and contribute a "GrayBG" colorscheme!

OK, so I'm replying to myself :)  It seems that the LightBG 0.10.2 colours are
more reasonable than for 0.10.1, the problem is really that the primary
colours that the ANSI allows you to specify generally don't look good
agains a Gray85 background (which is what I'm using). Not much that
ipython can do about that 

The trick (for me) has been to redefine the colours used for the ansi
translation ("M-x customize-apropos ansi" should get you there. Using
the nifty list at http://raebear.net/comp/emacscolors.html I hovered
over gray85 to make that the background, and then looked for colours
that have good contrast. I ended up with

 '(ansi-color-names-vector ["black" "red" "DarkOliveGreen4" "goldenrod4"
 "blue" "magenta" "DarkCyan" "Gray43"])

in my emacs-custom.el

>
> Thanks
> Neilen



More information about the IPython-User mailing list