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

Request ability to chose independent color syntax for editor and ipython console. #4891

Open
dhendricks-medic opened this issue Aug 3, 2017 · 10 comments

Comments

@dhendricks-medic
Copy link

Previous versions of spyder had two options for color schemes on the ipython console, a "Light background" and a "Dark background." The most recent version (3.2.0) does not have options, and defaults to "Dark background."

This may work well for some people but for those of us with mild red-green color blindness, its nearly impossible to see the light green color, or the purple colors on the dark background.

cant_see_colors

Please bring back the option to keep the ipython console color scheme "Light. In the mean time, I will be forced to revert back to 3.1.4 in order to continue my level of productivity.

Thank you for all the work you do, I love Spyder otherwise.

Versions and main components

  • Spyder Version: 3.2.0
  • Python Version: 3.5.3
  • Qt Version: 5.6.2
  • PyQt Version: 5 5.6
  • Operating system: Windows 10

Dependencies

IPython >=4.0 : 5.3.0 (OK)
cython >=0.21 : 0.25.2 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
nbconvert >=4.0 : 5.1.1 (OK)
numpy >=1.7 : 1.12.1 (OK)
pandas >=0.13.1 : 0.20.1 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pyflakes >=0.6.0 : 1.5.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.6.4 (OK)
qtconsole >=4.2.0: 4.3.0 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.5.2 (OK)
sympy >=0.7.3 : 1.0 (OK)

@dalthviz
Copy link
Member

dalthviz commented Aug 3, 2017

Hi @dhendricks-medic you can change the background color in the preferences dialog. For that you can go to Tools >Preferences > Syntax Coloring

imagen

To change specific things like the background, you can go to Edit selected:

imagen

This preferences will change the Editor and the IPython Console color scheme, or maybe you want to only do the change in the IPython Console?

@dhendricks-medic
Copy link
Author

@dalthviz,
I think I understand now that the "Syntax coloring" selections apply to both the editor and the console now. I did not understand that when i submitted the issue. I'm used to having the option to control them separately.

In past editions of spyder I've set my editor color syntax to "zenburn," and my ipython console to "Light". When I updated to the new spyder, my editor continued with the same zenburn setting, but my ipython console must have switched to "zenburn" to match the editor setting. This led to the confusion, because I couldn't find the option to switch ipython console color syntax any more, and I assumed there was a new "default" ipython console color syntax that everyone was forced to use.

I would like to be able to control the color syntax of my editor and console separately. Should I re-name the title of this issue?

Thanks for your time.

@dhendricks-medic
Copy link
Author

Part of my confusion comes from the fact that some of the font colors which show up in my ipython console don't appear to match up with any color choices in the "Zenburn" color palate. See the attached screen shot, where I've pointed to two colors in the console which I dont see in the palate.

screenshot 23

@dalthviz
Copy link
Member

dalthviz commented Aug 4, 2017

@dhendricks-medic you are right there is no preference to change the traceback color, for that we are checking if the color scheme is dark or not programmatically, maybe we can add a preference to choose it. Can you test if changing the traceback color with the magic %colors nocolor or maybe %colors lightbg works for you? you can see more options for the traceback colors here (the options are by default 'NoColor', 'Linux', 'LightBG', and 'Neutral')

About the title it could be as you say, something referencing having different syntax color preferences in the editor and console, or maybe the addition of a traceback color preference (that displays the options from IPython in case some of them works for you)?

@ccordoba12 @goanpeca what do you guys think about this?

@ccordoba12
Copy link
Member

I think those colors are hard-coded in IPython itself, so we can't modify them in Spyder, sorry.

@dhendricks-medic dhendricks-medic changed the title Can't see certain colors on ipython color scheme. Request ability to chose independent color syntax for editor and ipython console. Aug 4, 2017
@dhendricks-medic
Copy link
Author

@dalthviz I tried the magic commands, but it didn't change anything.

If there are no fine tune controls for the traceback colors, then we need the ability to have separate color options for the editor and the ipython console. I can't see the "dark background" color options on the console, but I hate coding in anything other than zenburn in the editor...

How hard would it be to bring back the "light background" and "dark background" options from past spyders?

screenhunter_174 aug 03 20 34

Or maybe you could give users a choice:

  • Same color syntax for editor and console (default)

  • Light background for console

  • Dark background for console

Thanks for working on this. I really like using Spyder, and I think most of what you guys do is awesome.

@ccordoba12
Copy link
Member

How hard would it be to bring back the "light background" and "dark background" options from past spyders?

Sorry, there's no way back. We had to do a lot of changes to make the IPython console to have the same color scheme as the Editor.

We could try to see if we can set the traceback colors by sending a pull request to the IPython project.

@dalthviz
Copy link
Member

dalthviz commented Aug 4, 2017

@dhendricks-medic in case you coudn't change the colors with the magic, the traceback colors that are available are:
The order is linux, nocolor, lightbg
imagen

Maybe the one that can help you is the nocolor option, if not the option could be the one that @ccordoba12 says

@dhendricks-medic
Copy link
Author

@dalthviz Thanks for the screen shot. I got the magic %colors command to work.

This works for a single instance of the console, but every time i open a new console, or restart the console I'd have to run the magic command again. I view this as a band-aid, and I'd rather revert to spyder 3.1.4 than type this in every time I open a new console.

@ccordoba12 I'd love for you to submit the PR with the ipython project. If spyder allowed users to select those colors in the preferences, then I'd be satisfied.

Thanks.

@ccordoba12
Copy link
Member

We'll try to submit a PR to the IPython project in the future.

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

4 participants