jupyter-notebookanacondajupyter-lab

Anaconda / JupyterLab: how can I modify a theme?


I've installed Anaconda (on Win 11) and moved over a project from Google Colab. Unfortunately, some of the syntax highlighting colors in the dark theme (particularly the string color) are really uncomfortable to look at and I would like to change them.

Google threw up a number of answers, which seem to be either outdated or I just can't get them to work. Some suggest editing the .css file for the dark theme, which seems straightforward enough, except that there are a large number of index.css and dark.css and I just can't seem to find the right one.

I've looked for alternative existing themes, but most of those in the extension manager or found through google seem to be outdated, with the website / repository no longer existing or unresolved issues piling up. JLDracula worked, but I'm not super happy with that one either. What I'm looking for is something similar to Google Colab or VS Code Dark.

I've also tried the theme-editor extension, which completely messed up the UI just by installing it.

I'd prefer to just edit a css file, but any other solution would be most welcome as well.


Solution

  • I finally found the css file that worked for making changes.

    It is at C:\Users\<user name>\anaconda3\envs\<env name>\share\jupyter\lab\themes\@jupyterlab\<theme name>\index.css