Robust default color scheme #2281

dimaqq opened this Issue Aug 10, 2012 · 3 comments

4 participants


Currently there are 3 color schemes to choose from:

  • linux, in which exceptions are unreadable in terminal with white background
  • lightbg, in which exceptions are hard to read in terminal with black background
  • nocolor, which has no colors

Other tools, e.g. GNU ls, manage to provide a default color scheme that's legible in both terminals with white and black backgrounds.

I would like to see ipython adopt similar default color scheme.

As far as I understand 2 bits are required:

  • never use "set fg black" or "set fg white" escape sequences, rather use "reset fg" seq, and
  • don't use very very light or very very dark colors.
IPython member

This would be very nice to have, so by all means if you can whip up a PR, we'll be happy to review it... We'd want to test it carefully for usability on white, light yellow and black terminals, but if it really works well across all three, it could be a nice new default (leaving the others available for those who want them).


Two cents: Black/White contrast is not the only kind of contrast found in the colour spectrum. Text that has the same b/w balance can be perfectly readable if you use opposite colours wisely. Notice how Solarized is readable while avoiding overuse of b/w contrast.

Another way of dealing with this issue would be just to make it easier for the user to customise the colour scheme, rather than just revamping the default ones. As it is, to change the colour scheme I don't just have to change the definitions at IPython.utils.coloransi, but I have to make sure IPython.core.prompts, IPython.core.excolors, IPython.utils.PyColorize and IPython.core.oinspect all use the colours I defined and where I want them to. A central file with all the colours definitions would simplify that a lot. (Please note that I'm working on IPython-0.13)


Perhaps a 3rd party package can be used, e.g.:

or perhaps pygments + solarized? not clear if "ansi" output is well supported though, these packages tend to slant towards html.

@n-riesco n-riesco referenced this issue in nteract/hydrogen Mar 25, 2016

Handle ansi colors in error messages #221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment