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

How to change the colors of console? #16607

Open
ok97465 opened this issue Oct 18, 2021 · 13 comments
Open

How to change the colors of console? #16607

ok97465 opened this issue Oct 18, 2021 · 13 comments

Comments

@ok97465
Copy link
Contributor

ok97465 commented Oct 18, 2021

What steps will reproduce the problem?

Hello. I want the colors of the console.
(Prompt, Error message, ...)
How can I change the colors?

console

#Spyder version: 5.2.0.dev0(#3cdcfc13e)

Mandatory:

atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 4.0.0 (OK)
cloudpickle >=0.5.0 : 2.0.0 (OK)
cookiecutter >=1.6.0 : 1.7.2 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=7.6.0 : 7.27.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.17.2 (OK)
jellyfish >=0.7 : None (OK)
jsonschema >=3.2.0 : 3.2.0 (OK)
keyring >=17.0.0 : 23.1.0 (OK)
nbconvert >=4.0 : 6.1.0 (OK)
numpydoc >=0.6.0 : 1.1.0 (OK)
parso >=0.7.0;<0.9.0 : 0.7.0 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.8.0 (OK)
pygments >=2.0 : 2.10.0 (OK)
pylint >=2.5.0 : 2.9.6 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.2.2;<1.3.0 : 1.3.0.dev0 (OK)
pylsp_black >=1.0.0 : None (OK)
qdarkstyle =3.0.2 : 3.0.2 (OK)
qstylizer >=0.1.10 : 0.1.10 (OK)
qtawesome >=1.0.2 : 1.0.2 (OK)
qtconsole >=5.1.0 : 5.1.1 (OK)
qtpy >=1.5.0 : 1.10.0 (OK)
rtree >=0.9.7 : 0.9.7 (OK)
setuptools >=49.6.0 : 58.0.4 (OK)
sphinx >=0.6.6 : 4.2.0 (OK)
spyder_kernels >=2.1.1;<2.2.0 : 2.2.0.dev0 (OK)
textdistance >=4.2.0 : 4.2.1 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 2.1.3 (OK)
xdg >=0.26 : 0.27 (OK)
zmq >=17 : 22.2.1 (OK)

Optional:

cython >=0.21 : 0.29.24 (OK)
matplotlib >=2.0.0 : 3.4.2 (OK)
numpy >=1.7 : 1.21.2 (OK)
pandas >=1.1.1 : 1.3.3 (OK)
scipy >=0.17.0 : 1.7.1 (OK)
sympy >=0.7.3 : 1.8 (OK)

@steff456
Copy link
Member

Hi @ok97465,

The colors of the console are linked to Spyder's theme, you can change it on Preferences > Appearance > Syntax Highlighting theme. You can either choose one from the list of themes, or change any color by clicking in Edit selected scheme or even create a new one.

Hope this helps! Please let me know if there's anything else you need help with

@ok97465
Copy link
Contributor Author

ok97465 commented Oct 19, 2021

In the figure below, "In [3]:" is the color of #00FF00 and "NameError"is the color of #FF0000.

console

I've been trying to find an option to change these colors, but I'm failed. Could you please explain in more detail?
Thank you.

@ccordoba12
Copy link
Member

Hey @ok97465, those colors are hard-coded in IPython and we can't adjust them in Spyder at the moment. However, that will change when IPython 8 is released in a couple of months because then third-party apps could decide what colors to use instead.

@green-slowmoe
Copy link

so now that IPython 8 is here, how should one go about homogenizing its colors with the rest of spyder?

@je-santos
Copy link

On dark mode it's hard to read the folder names when typingls. It's a very dark blue :(

@shiganai
Copy link

shiganai commented Mar 6, 2023

Hi, I'm facing the same issue.
Spyder is a good environment to debug with iPython,
so it will be great if we can customize the color scheme

@ccordoba12 ccordoba12 modified the milestones: important, v6.0.1 Mar 6, 2023
@Ellnz
Copy link

Ellnz commented Mar 26, 2023

I'm also finding it impossible to view the dark blue columns in the console when printing data.

@findlayjy
Copy link

Hi @ok97465,

The colors of the console are linked to Spyder's theme, you can change it on Preferences > Appearance > Syntax Highlighting theme. You can either choose one from the list of themes, or change any color by clicking in Edit selected scheme or even create a new one.

Hope this helps! Please let me know if there's anything else you need help with

This doesn't seem to be true for me, running spyder 5.2.2, at least. The iPython theme is frustratingly stubborn, and the dark blue is impossible to read on a dark background.

@ccordoba12
Copy link
Member

@findlayjy, are you talking about the colors in tracebacks?

@Aster-the-Med-Stu
Copy link

Aster-the-Med-Stu commented Oct 21, 2024

@ccordoba12 No, I think he is referring to running ls in ipython console. The dark blue color is very hard to read. Dunno if ipython console could follow editor's color schematics.
image

BTW the theme used here is Solarized Dark.

In another word, can we make console's standard color matches the one set in Preference?

@ccordoba12
Copy link
Member

ccordoba12 commented Oct 21, 2024

Those colors are hard-coded in IPython (the package that powers the console), so they are not easy to change.

@dalthviz, is there any chance we could remap the ANSI colors used for ls on our side?

@dalthviz
Copy link
Member

dalthviz commented Oct 22, 2024

I think that would mean to do something like the handling of the yellow color that was being done over QtConsole and was reverted over jupyter/qtconsole#611 Just in case, as a workaround for the ls color (which strangely seems like doesn't affect Windows 🤔) maybe using the colors magic NoColor option could help. Note, however, that using such option will made all the terminal output to be white. To activate that you can run something like %colors nocolor and to revert it you can run something like %colors linux

Edit: More info on %colors: https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-colors

@ccordoba12
Copy link
Member

I think that would mean to do something like the handling of the yellow color that was being done over QtConsole and was reverted over jupyter/qtconsole#611

Ok, things don't seem so simple as I thought.

These are a couple of resources that could help to solve this problem:

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

10 participants