garej
garej

Reputation: 565

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

Upvotes: 2

Views: 5856

Answers (2)

hongkail
hongkail

Reputation: 789

In the settings.json -- can be found at File(Windows)/Code(Mac)>Preferences>Settings -- click on any link stated "Edit in settings.json"

Adding this into the json will work -- notebook's setting has to be put under the workbench.colorCustomizations.

"workbench.colorCustomizations": {
"notebook.outputContainerBackgroundColor": "#FFFFFF",
  },

Upvotes: 4

Guillermo Brachetta
Guillermo Brachetta

Reputation: 4805

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.

Upvotes: 1

Related Questions