/jupyterlab-skills:jupyterlab-themingfrom jupyterlab-skills
Change the look of JupyterLab - colors, fonts, spacing, density, the style of tabs, toolbars, sidebars, notebook cells and the launcher, and which elements show. Use it to create a custom theme (light, dark, or a pair) without a build step, to set it as the default, to restyle or hide parts of the interface with CSS, to bundle fonts, and to choose between a theme, an extension stylesheet and custom.css. Gives a script that scaffolds a complete theme extension from a built-in theme, the command that lists the theme CSS variables, and the selectors of the main interface parts. Use it for requests such as "make it look like…", "change the colors", "use this font", "dark mode by default", "make the UI more compact", "brand it".
Ships in jupyterlab-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Three levels. Use the lowest one that does the job.
| Level | Use for | How |
|---|---|---|
| 1. Select a theme | A built-in or installed theme as the default | A setting. No CSS |
| 2. Stylesheet | A few rules on top of any theme: hide an element, round the tabs, compact spacing | style.css of an extension, or custom.css for one user |
| 3. Theme extension | A complete look: palette, fonts, optional dark variant. The user can select it in Settings → Theme | scripts/new_theme.py |
Default override (skill jupyterlab-settings):
{ "@jupyterlab/apputils-extension:themes": { "theme": "JupyterLab Dark" } }
Built-in: JupyterLab Light, JupyterLab Dark,
JupyterLab Dark High Contrast. Follow the system preference with
"adaptive-theme": true plus preferred-light-theme and
preferred-dark-theme. Other themes install with pip (search PyPI for
"jupyterlab theme"); the name to use is the one in Settings → Theme.
For an environment or a distribution: a stylesheet in an extension. It loads for every user and ships in a package.
python ../jupyterlab-extensions/scripts/jlab_ext.py new my-style --dest ./extensions --style
Write the rules in static/style.css, install the extension, restart the
server once. After a later edit, run jlab_ext.py stamp <folder> and reload
the page: the browser keeps the files of static/ for one year, and only a
new stamp in their URL makes it load them again. If the skill
jupyterlab-extensions is not available, create the three files by hand: see
"Stylesheet-only extension" in
references/selectors.md.
For one user, quickly: custom.css.
<user config dir>/custom/custom.css (~/.jupyter/custom/custom.css).jupyter lab --custom-css, or set LabApp.custom_css = True
in jupyter_server_config.json.custom.css is read from the user config folder only. It cannot ship in an
environment or a package. Documentation:
https://jupyterlab.readthedocs.io/en/stable/user/custom_css.html
Rules for both:
background: var(--jp-layout-color2).:root to change it everywhere:
:root { --jp-border-radius: 6px; }. A stylesheet of an extension loads
before the theme, so a theme wins when both set the same variable on
:root. Use body or .jp-ThemedContainer as the selector to win over
the theme: body { --jp-code-font-size: 14px; }.body:
body[data-jp-theme-light="false"] …,
body[data-jp-theme-name="JupyterLab Dark"] ….python scripts/new_theme.py my-theme --theme "Paper:light" --theme "Paper Night:dark" --dest ./extensions --python <env>/bin/python
Each --theme is LABEL:BASE, with light or dark as the base. The
script writes a no-build extension:
my-theme/
├── package.json
├── static/remoteEntry.js registers the themes
└── themes/my-theme/
├── paper/
│ ├── base.css full copy of the built-in light theme
│ └── index.css your overrides
└── paper-night/
├── base.css full copy of the built-in dark theme
└── index.css
Edit index.css of each theme. Redefine variables in :root, then add
rules for what variables cannot reach. Do not edit base.css.
Install the folder into share/jupyter/labextensions/:
jlab_ext.py install of the skill jupyterlab-extensions, or copy it
there, or create it in the labextensions/ folder of a distribution
project.
Make it the default (skill jupyterlab-settings):
{
"@jupyterlab/apputils-extension:themes": {
"theme": "Paper",
"adaptive-theme": false,
"preferred-light-theme": "Paper",
"preferred-dark-theme": "Paper Night"
}
}
Restart the server. Verify with the probe (skill jupyterlab-verify):
--expect-theme "Paper" --screenshot paper.png. Open a notebook before the
screenshot (--exec 'notebook:create-new:{"kernelName":"python3"}'): most
of the variables show there.
Why the full copy: JupyterLab has no fallback values. A theme that defines
only its own colors leaves fonts, sizes and borders undefined, and the
interface breaks. base.css gives every variable a value; index.css loads
after it and wins.
:root {
/*
* Surfaces. 0: notebook and editor background. 1: panels, toolbars, menus.
* 2: sidebars, tab bar, hover. 3: dock background, pressed. 4: strongest.
*/
--jp-layout-color0: #fbf7ee;
--jp-layout-color1: #fbf7ee;
--jp-layout-color2: #f1ead9;
--jp-layout-color3: #e2d8bf;
--jp-layout-color4: #8a7f66;
/*
* Borders, from the strongest (0) to the faintest (3).
*/
--jp-border-color0: #cdbf9f;
--jp-border-color1: #d8ccb0;
--jp-border-color2: #e6dcc6;
--jp-border-color3: #efe7d6;
--jp-border-radius: 4px;
/*
* Text of the interface. 0 is the strongest, 3 is for disabled items.
*/
--jp-ui-font-color0: rgba(43, 38, 32, 1);
--jp-ui-font-color1: rgba(43, 38, 32, 0.87);
--jp-ui-font-color2: rgba(43, 38, 32, 0.6);
--jp-ui-font-color3: rgba(43, 38, 32, 0.38);
/*
* Text of the content: Markdown cells and rendered output.
*/
--jp-content-font-color0: rgba(43, 38, 32, 1);
--jp-content-font-color1: rgba(43, 38, 32, 0.87);
--jp-content-font-color2: rgba(43, 38, 32, 0.6);
--jp-content-font-color3: rgba(43, 38, 32, 0.38);
--jp-content-link-color: #b4532a;
/*
* Brand: selection, active tab, primary buttons, focus. 1 is the main one,
* 0 is darker, 2 to 4 are lighter tints.
*/
--jp-brand-color0: #8f3f1e;
--jp-brand-color1: #b4532a;
--jp-brand-color2: #d98b68;
--jp-brand-color3: #f0cdbb;
--jp-brand-color4: #f8e6dc;
--jp-accent-color1: #2f7d6d;
/*
* Fonts: interface, content (Markdown), code.
*/
--jp-ui-font-family: 'Inter', system-ui, sans-serif;
--jp-ui-font-size1: 13px;
--jp-content-font-family: 'Source Serif 4', Georgia, serif;
--jp-content-font-size1: 16px;
--jp-code-font-family: 'JetBrains Mono', monospace;
--jp-code-font-size: 13px;
/*
* Cells.
*/
--jp-cell-editor-background: #f4eedf;
--jp-cell-editor-border-color: transparent;
--jp-cell-editor-active-background: #fffdf7;
--jp-cell-editor-active-border-color: var(--jp-brand-color1);
--jp-notebook-multiselected-color: #f8e6dc;
/*
* Inverse surfaces: tooltips, dark badges.
*/
--jp-inverse-layout-color0: #2b2620;
}
For a dark theme the scale runs the other way: --jp-layout-color0 is the
darkest surface and the font colors are light.
Also restyle, when the palette changes a lot:
--jp-mirror-editor-keyword-color,
-string-color, -comment-color, -number-color, -def-color,
-variable-color, -operator-color, -builtin-color… List them with
jlab_inspect.py css-variables mirror-editor.--jp-warn-color*, --jp-error-color*,
--jp-success-color*, --jp-info-color*.--jp-icon-contrast-color0…3, and the file type colors
(--jp-notebook-icon-color, --jp-jupyter-icon-color).--jp-scrollbar-thumb-color,
--jp-scrollbar-background-color; they apply when the theme registers with
themeScrollbars: true (in THEMES of static/remoteEntry.js). The
built-in light theme leaves them empty: a light theme with themed
scrollbars must set its own values.The full list comes from the installation, with the light and dark values
(skill jupyterlab-inspect). Give a text to filter by name:
<env>/bin/python ../jupyterlab-inspect/scripts/jlab_inspect.py css-variables layout-color
Many values refer to other variables or to the Material palette
(var(--md-grey-300,#e0e0e0): the fallback after the comma is the real
color). Change the variables at the start of a chain and the rest follows.
To compare your installed theme with its base, name both:
css-variables --theme theme-light-extension --theme paper.
The list does not say where a variable applies. A variable applies in each
place where a stylesheet uses it: --jp-cell-editor-background is for the
editors of code, Markdown and raw cells, and
--jp-cell-editor-active-background replaces it while an editor has the
focus. To limit a change, set the variable on a narrower selector, and
check the computed style with the probe:
body[data-jp-theme-light='true'] .jp-CodeCell {
--jp-cell-editor-background: #fff9c4;
--jp-cell-editor-active-background: #fffde7;
}
Do not link to a font CDN: many JupyterLab installations have no internet access, and the result differs between machines. Bundle the files.
Put .woff2 files in the theme folder, for example
themes/my-theme/fonts/Inter-Variable.woff2. Sources: the @fontsource
packages on npm (npm pack @fontsource-variable/inter, then take the
files/*.woff2), or the release files of the font project. Check that the
license permits redistribution (the SIL Open Font License does).
Declare them at the top of index.css, with a path relative to the CSS
file:
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url('../fonts/Inter-Variable.woff2') format('woff2');
}
Use them: --jp-ui-font-family: 'Inter', system-ui, sans-serif;. Always
keep a system fallback.
In a stylesheet-only extension, put the fonts in static/fonts/ and use
url('fonts/…').
A theme file can hold any CSS. Typical additions in index.css:
/*
* Flat tabs with an underline for the active one.
*/
.lm-DockPanel-tabBar .lm-TabBar-tab {
border: none;
background: transparent;
}
.lm-DockPanel-tabBar .lm-TabBar-tab.lm-mod-current {
box-shadow: inset 0 -2px 0 var(--jp-brand-color1);
}
/*
* Serif headings in Markdown cells.
*/
.jp-RenderedHTMLCommon h1,
.jp-RenderedHTMLCommon h2 {
font-family: var(--jp-content-font-family);
font-weight: 600;
}
Rules in a theme apply only while the theme is active. Rules that must hold with every theme belong in a stylesheet (level 2).
Two themes of one extension can share rules: put them in
themes/<name>/common.css and start each index.css with
@import url('../common.css');.
In a distribution project, run jlab_dist.py check --fix after you add the
theme: it marks the extension as owned by the Python package.
--scale 2 --screenshot and look at the image: the home page,
an open notebook with a code cell, a Markdown cell and an output, the file
browser, a menu, a dialog, the command palette, the settings editor.layout-color1 and layout-color2, the selected
row of the file browser (white text on brand-color1), disabled text.--exec 'apputils:change-theme:{"theme":"Paper Night"}' and look again.--fail-on-console-error: a 404 on a font or CSS file shows as an error..lm-SplitPanel-handle,
.lm-DockPanel-handle), drag it with --drag and compare a size before
and after. A transition or a transition-delay on all properties also
delays the position of the divider, and a drag then moves it much too far.
Name the property: transition: background-color 0s 0.2s.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jtpio/jupyterlab-skills --plugin jupyterlab-skills8 skills in this plugin
/jupyterlab-customizeStart here for any request to change how JupyterLab looks or behaves. Covers disabling or hiding an extension or a part of the UI, changing a default (theme, layout, editor, notebook, file browser), editing menus, toolbars, context menus and keyboard shortcuts, adding a button, panel, command or home page, restyling or rebranding the application, and packaging the result as an installable JupyterLab distribution. Chooses the right mechanism (page config, setting overrides, user settings, server config, CSS or theme, new extension, Python package) and hands over to the companion skills jupyterlab-inspect, jupyterlab-settings, jupyterlab-extensions, jupyterlab-theming, jupyterlab-distribution, jupyterlab-remix and jupyterlab-verify. Use it also when the user does not say "JupyterLab" but works in a Jupyter notebook environment./jupyterlab-distributionPackage a customized JupyterLab as one installable Python package - a "distribution" such as xtralab - that brings JupyterLab, its configuration (disabled plugins, default settings, layout, menus), its extensions and themes, extra dependencies, a launch command and its own name. Use it when the user wants an artifact to install or share instead of changes in one environment - "make this a package", "create my own JupyterLab app", "something I can pip install", "ship these customizations to my team", "turn this environment into a wheel". Gives a script that scaffolds the project, imports customizations already made in an environment, and checks the project and the wheel; plus the steps to build, test in a clean environment, and brand the application./jupyterlab-extensionsAdd new behavior to JupyterLab with an extension, created on the fly and without a build step. Use it when configuration is not enough - to add a command, a toolbar or top-bar button, a menu with new actions, a sidebar or main-area panel, a status bar item, a launcher card, a custom home page, a file type, a keyboard shortcut for a new action, a settings schema, or to replace a core part such as the launcher, the splash screen, the logo or the About dialog. Gives a script that scaffolds, checks and installs a plain-JavaScript prebuilt extension into an environment or a distribution project, verified code patterns for the common extension points, and the TypeScript build path for extensions that need npm dependencies. Use it for requests such as "add this to the UI", "add a button that…", "create an extension", "replace the launcher"./jupyterlab-inspectFind out how a JupyterLab installation is set up before you change it. Use it to locate the config and data folders and the right place to write, to find the exact ID of a plugin, setting, command, menu, toolbar item or sidebar widget, to read the schema and default of a setting, to see which extensions are installed, and to explain why a customization does not apply (effective page config, effective overrides, user settings that hide a default). Use it before any JupyterLab customization, and when the user asks "what is the ID of…", "where does JupyterLab read…", "which extensions are installed", or "why does my setting not work"./jupyterlab-remixBuild a new application from JupyterLab packages - a "remix" with its own JavaScript bundle and its own server class, in place of a customized JupyterLab. Use it when configuration and prebuilt extensions are not enough - an application that compiles in only a chosen subset of the JupyterLab core plugins, an application with its own shell and layout (a single-document notebook application, a kiosk, a dashboard) in the style of Jupyter Notebook 7 or jupyterlab-app-cookiecutter, or a page that embeds one JupyterLab component with no plugin system, as the examples folder of the JupyterLab repository does. Gives a scaffold script with templates that were built and run, a planner that tells which core packages a selection needs and which plugins to disable, the build and packaging steps to a wheel, and the browser checks. Use it for requests such as "build my own application on JupyterLab components", "a minimal notebook app", "remix JupyterLab", "custom shell", "embed a notebook in a page"./jupyterlab-settingsChange JupyterLab with configuration files, no code. Use it to disable, enable or lock a plugin or a whole extension (status bar, extension manager, debugger, announcements, launcher, table of contents…), to change the default of any setting (theme, autosave, line numbers, file browser, terminal, notebook, completer), to move panels between the left, right, main and bottom areas, to edit the main menu, context menu, toolbars and keyboard shortcuts, to rename the application, and to set server options that affect the UI. Covers page config, default setting overrides, user settings and server config, their precedence, and a script that writes them with validation. Use it for requests such as "disable this extension", "hide this part of the UI", "make this the default", "remove this menu", "change this shortcut".