Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

vscode settings - How to set color of cell output of jupyter notebook (.ipynb) in VS Code editor?

Sometimes it is convenient to deal with jupyter notebooks from the VS Code editor (faster load, less latency and easier debugging).
Nonetheless, there is a problem that default theme colors are not contrast enough to distinguish between input and output cells.

I'm having a hard time to figure out which setting I should change, to, let us say, make the output cell background just "dark-grey" (I'm using default VS 2019 Dark theme but other options are also not contrast with .ipynb files). Any help will be welcome.

(I've also come across other similar questions but did not find the turn key solution.)

Example:

enter image description here

question from:https://stackoverflow.com/questions/65869769/how-to-set-color-of-cell-output-of-jupyter-notebook-ipynb-in-vs-code-editor

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I'm not sure if this helps you, but you can try overriding VSCode's theme by adding this to your settings.json file:

{
  "jupyter.ignoreVscodeTheme": true
}

If you prefer to use VSCode's gui to edit settings, you can go to your Jupyter extension (assuming you have it installed) => Extension settings => and check "Ignore Vscode Theme".

You need to restart or reload VSCode for this to take effect.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...