I would like to know what is the JSON setting to change the background colour of a VSCode Jupyter Notebook cell.
I found the VSCode Theme colour reference but I can't find the specific setting to do so.
I found the perfect colour theme but I would like to tweak the background colour cell just a bit.
For those interested the setting is:
"editorWidget.background": "#ff0000",
To find it, from the command palette I ran:
Developer: Generate Color Theme from Current Settings
This will create a new json document with ALL the elements currently affected by your current theme, from there I search for all the occurrences of the hex colour until I found the matching setting.
UPDATE: Please see Mark's answer below
Mark's answer is not comprehensive enough. Not sure if it is the best, please try.
In the settings.json -- can be found at File(Windows)/Code(Mac)>Preferences>Settings
Adding this into the json will work -- notebook's setting has to be put under the workbench.colorCustomizations.
"workbench.colorCustomizations": {
"notebook.cellEditorBackground": "#FFFFFF",
},
The rest of the settings you may follow Mark's guide above.
However, customizing the color background alone at jupyter notebook at vscode is not enough, i need the complete best settings including the font colors. Please share if you found the settings for all under notebook. Or can we change the notebook theme only but leaving the rest of vscode theme untouched?
vscode v1.59 is adding this colorCustomization:
"notebook.cellEditorBackground"
Also available:
"notebook.cellBorderColor"
Previously:
That theme color reference link doesn't seem to be kept up-to-date. See vscode Theme Color reference instead. There are a lot of notebook-related theme colors:
Notebook colors
including:
notebook.focusedCellBackground
notebook.selectedCellBackground
and many more.
Related
I am using VScode with a dark theme and the text dispayed in Jupyter notebook markdown is pretty pale example
What I have been doing is trying to change my color theme in settings.json, but I can not find a variable that accounts for the notebook markup font color, let me give you an example of an existing variable that is similar to what I am looking for "notebook.markup.fontSize": 20. I could not find neither the variable nor the full list of such.
I know I might explicitly assing font color for each cell, but I find it really tedious as I have tons of them.
Are there any other solutions to this problem?
I have tried installing extensions, checking out jupyter VScode settings. Couldn't find anything.
I am using VSCode with Jupyter (for .ipynb files) and I would like to change the color of my input cells.
Currently, it looks like this :
How can I change the color of my input cell without changing the theme I use ? Thanks.
Go to settings and mark Python > Data Science: Ignore Vscode Theme, then restart VScode, after which Notebooks will become white. Not beautiful, but at least you now can see the input cells without kissing the display:
Same as #tyrex answer, except that now it is under the "Jupyter" extension. Found it by searching for "vscode theme" in the settings.
Is it possible to customize the colors used by VSC background and text? I've tried all the color themes and none gives me what I need to see text clearly and comfortably. I can't find information on this in the Help, in the menus, or by searching on the Web.
I found the full list of color settings. I would imagine this would be useful to almost every user. It is at https://code.visualstudio.com/api/references/theme-color .
I resently switched to Visual Studio Code as my editor. I installed my favorite theme "Material Theme Palenight High Contrast". I'm in love with it. There is just on problem, that really hinders me when coding on my laptop.
The squiggly lines of the linting error are super dark, because they have opacity.
As you can see here, one can barely see the error below item. Is there a way to change the opacity of linting errors?
EDIT: I tried setting workbench.colorCustomizations but that caused my theme to disappear.
Edit 2: I tried setting the theme specific settings like this:
"workbench.colorCustomizations": {
"[Material Theme Ocean High Contrast]": {
"editorError.foreground": "#ff0000"
}
},
but it didn't work. The color of the squiggly stayed the same.
The instructions on the theme page you linked say to use editor.colorCustomizations, not workbench.colorCustomizations. Have you tried that?
There's also a bit above the link I gave that talks about setting the accent color. They don't define what "accent color" means, so I'm not sure if that color is the thing you're trying to change, but you might try it.
I was able to find a fix. Go to the place where your extensions are installed:
/Users/user-name/.vscode/extensions/extension-name/themes/theme-name.json
In that file find the values for editorError.foreground and editorWarning.foreground. Here you can overwrite their values and it will work.
I'm just asking myself, whether this should be an issue for the VSCode repository? Since setting the settings in the user settings should overwrite this. One shouldn't have to change this .json file. Especially since this will change back again, if you re-install the theme.
Dummy Edit 🤦🏻♂️:
Damn, I accidently wrote Oceaning insteand of Palenight. The color customizations work... My bad. No need to do this hacky trick I described above.
I am not a huge fan of the peach color in the explorer for modified files. Searching through the color theme reference I can't seem to find an override..
https://code.visualstudio.com/docs/getstarted/theme-color-reference
I've even tried disabling extensions and I am still seeing those predefined colors.. I am using the Monokai Soda theme but that doesn't seem to be what is setting those colors in the sidebar..
Any help appreciated - it's kinda driving me crazy..
ANSWER
Needed a combo of error style and git overrides, see answer below:
"workbench.colorCustomizations": {
"list.errorForeground": "#b3e5ec",
"list.warningForeground": "#00d9ff",
"gitDecoration.modifiedResourceForeground": "#00ffb3",
"gitDecoration.untrackedResourceForeground": "#f7aeae"
}
Turns out that the colour you're seeing isn't due to modified content. It's due to having problems/errors in your file. If you hover over the file name you should see x problems detected in this file.
To change the colour of those, you can use
"workbench.colorCustomizations": {
"list.errorForeground": "#00AA00"
}
The colour for modified files looks like the colour that settings.json is highlighted in, aka light green.