KMFR
KMFR

Reputation: 935

VS Code with Jupyter's interactive window: How to change the syntax colors in Python Interactive window (some text is unreadable on dark themes)?

I'm using VS Code with the Jupyter's Python Interactive window so that I can run individual cells and get the output, figures etc. in the Python Interactive window.

However, some of the colors are unreadable on darker themes, for example see the blue and red words in the example below.

Changing the theme does not change the colors in the Python Interactive window.

enter image description here

Upvotes: 7

Views: 14516

Answers (3)

Srinadh
Srinadh

Reputation: 566

Change the theme to vs-code dark theme/default-themes and change back to your custom theme.

Notebook will retain the vs codes defaults themes.

Only a workaround to get a pretty theme in notebook. Cant change to custom theme.

That would make this.

Notebook Theme before switching the theme.

to this

Notebook Theme after switching theme to default vscode dark mode then to custom theme

If you are wondering, My Vs Code theme is Bluloco Dark theme

Upvotes: 0

arvi1000
arvi1000

Reputation: 9592

There's a helpful thread on customizing Jupyter colors on this VS Code Python github issue: https://github.com/Microsoft/vscode-python/issues/3773.

Given a recent download of the python extension, you can go to settings > user settings, then search for 'data science', and adjust things there. My issue was error cells of the interactive window not matching the default dark theme.

Before: enter image description here

I applied this solution (https://github.com/Microsoft/vscode-python/issues/3773#issuecomment-478073314), and now:

enter image description here

I'm using VS Code 1.33.0, with Python extension v 2019.3.6352 on OS X.

Upvotes: 0

daveg
daveg

Reputation: 535

Not a complete answer to your question unfortunately, but I have found the built in dark themes remain legible in the python interactive window. You may find that you have to restart vs code for the theme change to occur. This is a screen shot while using the included dark+ theme.

enter image description here

Upvotes: 0

Related Questions