# How can I change code colors in Jupyter-lab installed via pip?

**URL:** <https://discourse.jupyter.org/t/how-can-i-change-code-colors-in-jupyter-lab-installed-via-pip/20147>\
**Category:** JupyterLab\
**Created:** [June 28, 2023, 3:59pm UTC](https://discourse.jupyter.org/t/how-can-i-change-code-colors-in-jupyter-lab-installed-via-pip/20147 "2023-06-28T15:59:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![spookster](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/spookster/32/8939_2.png) [@spookster](https://discourse.jupyter.org/u/spookster)\
**Post date:** [June 28, 2023, 4:18pm UTC](https://discourse.jupyter.org/t/how-can-i-change-code-colors-in-jupyter-lab-installed-via-pip/20147/2 "2023-06-28T16:18:52Z")

</div>

the default themes rest @ `~/.local/share/jupyter/lab/themes` if installed at user level.  
otherwise it should be in `/usr/share/...`.

the colors are defined in the index.css files, and syntax colors are in this block :

```auto
/* Code mirror specific styles */

  --jp-mirror-editor-keyword-color: #008000;
  --jp-mirror-editor-atom-color: #88f;
  --jp-mirror-editor-number-color: #080;
  --jp-mirror-editor-def-color: #00f;
  --jp-mirror-editor-variable-color: var(--md-grey-900);
  --jp-mirror-editor-variable-2-color: rgb(0, 54, 109);
  --jp-mirror-editor-variable-3-color: #085;
  --jp-mirror-editor-punctuation-color: #05a;
  --jp-mirror-editor-property-color: #05a;
  --jp-mirror-editor-operator-color: #a2f;
  --jp-mirror-editor-comment-color: #408080;
  --jp-mirror-editor-string-color: #ba2121;
  --jp-mirror-editor-string-2-color: #708;
  --jp-mirror-editor-meta-color: #a2f;
  --jp-mirror-editor-qualifier-color: #555;
  --jp-mirror-editor-builtin-color: #008000;
  --jp-mirror-editor-bracket-color: #997;
  --jp-mirror-editor-tag-color: #170;
  --jp-mirror-editor-attribute-color: #00c;
  --jp-mirror-editor-header-color: blue;
  --jp-mirror-editor-quote-color: #090;
  --jp-mirror-editor-link-color: #00c;
  --jp-mirror-editor-error-color: #f00;
  --jp-mirror-editor-hr-color: #999;

```

import is a keyword so you’d have to change the first variable.

---

_[View the full topic](https://discourse.jupyter.org/t/how-can-i-change-code-colors-in-jupyter-lab-installed-via-pip/20147)._
