Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...