Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robust default color scheme #2281

Open
dimaqq opened this issue Aug 10, 2012 · 8 comments
Open

Robust default color scheme #2281

dimaqq opened this issue Aug 10, 2012 · 8 comments
Assignees
Milestone

Comments

@dimaqq
Copy link

dimaqq commented Aug 10, 2012

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.
@fperez
Copy link
Member

fperez commented Aug 10, 2012

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).

@dmvianna
Copy link

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)

@dimaqq
Copy link
Author

dimaqq commented Jul 24, 2014

Perhaps a 3rd party package can be used, e.g.:
https://pypi.python.org/pypi/colorama

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

@tgmiller5
Copy link

is it possible that I can be assigned to this issue?

@dimaqq
Copy link
Author

dimaqq commented Oct 6, 2022

@tgmiller5 I don't know how this project is typically operated, but I'd hazard a guess that you can just go ahead, make a pull request, attach a couple of screenshots and go from there!

@fperez
Copy link
Member

fperez commented Oct 10, 2022

@tgmiller5 thanks for offering to help! Indeed a PR with some progress is all it takes, but in the event it helps you manage your workflow, I've assigned it to you. Any input/progress you may contribute will be greatly appreciated!

@DhanushA1307
Copy link

I'm interested to contribute to this issue. So, kindly accept my request @dimaqq

@dimaqq
Copy link
Author

dimaqq commented Oct 9, 2024

@DhanushA1307 I'm not a maintainer here.
Additionally I'm not clear what your request is.

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

No branches or pull requests

6 participants