Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xwmx/nb/llms.txt
Use this file to discover all available pages before exploring further.
nb uses color throughout its interface to highlight IDs and selectors, the current notebook name, the shell prompt, divider lines, syntax elements, and links. All of this is controlled through a layered theming system: pick a built-in theme, install a custom .nb-theme plugin, or override individual color variables and emoji indicators directly in ~/.nbrc.
Setting the Active Theme
Change the active color theme withnb set color_theme:
Built-in Color Themes
nb ships with eleven built-in themes. Use nb settings colors themes to list all installed themes (built-in and user-installed) at any time.
nb (default)
The default theme. Balanced colors suitable for most terminal backgrounds.
blacklight
Dark, high-contrast theme with vivid accent colors.
console
Minimal monochrome-style theme for distraction-free work.
desert
Warm earth tones inspired by classic Vim desert colorscheme.
electro
Bright electric accents on a dark background.
forest
Deep greens and natural tones.
ocean
Cool blues and teals for a calm interface.
raspberry
Rich reds and pinks.
smoke
Soft grey monochrome theme for subdued environments.
unicorn
Playful pastel rainbow palette.
utility
Clean, no-frills utility style with minimal color.
Previewing Colors
Primary and Secondary Colors
Every theme defines two color variables. You can override them independently to fine-tune any theme without creating a full.nb-theme file.
| Variable | Default | Role |
|---|---|---|
$NB_COLOR_PRIMARY | terminal-dependent | IDs, notebook name, links, highlights |
$NB_COLOR_SECONDARY | 8 | Divider lines and secondary accents |
nb set colors to see a full color table with the corresponding numbers.
Custom Color Themes
Color themes arenb plugins with a .nb-theme file extension. A theme file contains a single if block that checks for the theme name and exports NB_COLOR_PRIMARY and NB_COLOR_SECONDARY:
Installing a Custom Theme
Theme files follow the same installation mechanism as
.nb-plugin files. See Plugins for full details on managing installed plugins.Terminal Syntax Highlighting
Whenbat, highlight, or Pygments is installed, nb displays files with syntax highlighting.
The syntax highlighting theme is controlled by $NB_SYNTAX_THEME (default: base16). When bat is installed, both light and dark background themes are available:
GUI Web Syntax Highlighting
When browsing notes withnb browse --gui, syntax highlighting is also applied to text-format items. The web view incorporates the current themeβs primary color into the syntax highlight palette automatically β no extra configuration required.
Customizing Indicators
nb uses emoji characters called indicators to represent file types and item states in list views. Every indicator has a corresponding environment variable that you can override in ~/.nbrc.
Changing an Indicator
Open~/.nbrc with nb settings edit and add an export line:
Disabling an Indicator
Assign an empty string to remove an indicator entirely:Available Indicators
The full set of indicator variables with their default values:Shell Prompt Integration
nb supports shell prompt themes that display the current notebook name in the terminal prompt context line. The astral Zsh theme is designed to work with nb and shows the active notebook name automatically.