PyCQA / redbaron

Bottom-up approach to refactoring in python
http://redbaron.pycqa.org/
694 stars 74 forks source link

iPython coloring is hard to read on light-colored terminals #84

Open ceridwen opened 8 years ago

ceridwen commented 8 years ago

I'm not sure if there's a good solution for this, but I habitually use a black-on-white terminal and some colors for redbaron in iPython are almost invisible against the light background.

bosr commented 8 years ago

@ceridwen, I currently use this workaround: in redbaron.py:

It's a dirty quick fix, nothing more :) May be it can be factored out.

Psycojoker commented 8 years ago

Another solution introduced in the current release pygments is optionnal so if you don't install it you won't have any coloring.

I've fiddle around but it's apparently impossible to detect the background color of the terminal and I haven't managed to find a good theme for pygments that works well in both situations.

I guess that adding something like LightRedBaron or RedBaron(str, theme="light") could be a somehow solution but nothing seems great :/

matejcik commented 6 years ago

my quick fix is to completely remove the style argument from both places where it is used (here and here). I don't know how that worked 3 years ago, but today the default theme handles both dark and light terminals fine.

Could we get this change applied? I'll send a PR if you like