Skip to content
New Kodine v2 is now available

Themes

Pick a built-in theme or craft your own.

Kodine lets you pick from several built-in themes, follow your terminal’s own theme, or build a custom theme of your own.

Out of the box, Kodine ships with its own kodine theme.


Terminal requirements

Themes only render with their full color palette when your terminal supports truecolor (24-bit color). Most modern terminals have this on by default, but you might need to switch it on:

  • Check support: Run echo $COLORTERM — the output should be truecolor or 24bit
  • Enable truecolor: Add COLORTERM=truecolor to your shell profile
  • Terminal compatibility: Your terminal emulator needs 24-bit color support (iTerm2, Alacritty, Kitty, Windows Terminal, and recent GNOME Terminal versions all qualify)

Missing truecolor, themes render with lower color accuracy or degrade to the closest 256-color match.


Built-in themes

Several themes ship with Kodine.

NameDescription
systemFollows your terminal’s background color
tokyonightA port of the Tokyonight theme
everforestA port of the Everforest theme
ayuA port of the Ayu dark theme
catppuccinA port of the Catppuccin theme
catppuccin-macchiatoA port of the Catppuccin theme
gruvboxA port of the Gruvbox theme
kanagawaA port of the Kanagawa theme
nordA port of the Nord theme
matrixGreen-on-black hacker aesthetic
one-darkA port of the Atom One Dark theme

And the list keeps growing — new themes land regularly.


System theme

system automatically follows your terminal’s color scheme. Where traditional themes hardcode their colors, the system theme instead:

  • Generates a gray scale: derives a custom gray ramp from your terminal’s background color for the best possible contrast.
  • Uses ANSI colors: standard ANSI colors (0-15) drive syntax highlighting and UI elements, honoring your terminal’s palette.
  • Preserves terminal defaults: text and background use none, keeping your terminal’s native look.

The system theme suits you if you:

  • Want Kodine to blend in with your terminal
  • Run a custom terminal color scheme
  • Like a uniform look across all your terminal apps

Using a theme

Pick a theme through the theme selector via the /theme command, or set it in tui.json.

tui.json
{
"$schema": "https://kodine.net/tui.json",
"theme": "tokyonight"
}

Custom themes

Kodine’s theme system is JSON-based and flexible, so creating and tweaking themes is straightforward.


Hierarchy

Themes load from several directories, in this order, with later directories taking precedence over earlier ones:

  1. Built-in themes — embedded in the binary
  2. User config directory — ~/.config/kodine/themes/*.json or $XDG_CONFIG_HOME/kodine/themes/*.json
  3. Project root directory — <project-root>/.kodine/themes/*.json
  4. Current working directory — ./.kodine/themes/*.json

When several directories define a theme under the same name, the higher-priority directory’s version wins.


Creating a theme

A custom theme is just a JSON file dropped into one of the theme directories.

For a user-wide theme:

Terminal window
mkdir -p ~/.config/kodine/themes
vim ~/.config/kodine/themes/my-theme.json

And for a project-specific theme:

Terminal window
mkdir -p .kodine/themes
vim .kodine/themes/my-theme.json

JSON format

The theme JSON format accepts:

  • Hex colors: "#ffffff"
  • ANSI colors: 3 (0-255)
  • Color references: "primary" or names you define yourself
  • Dark/light variants: {"dark": "#000", "light": "#fff"}
  • No color: "none" — falls back to the terminal default (or transparency)

Color definitions

defs is optional; use it to name reusable colors you can reference elsewhere in the theme.


Terminal defaults

Any color can be set to the special value "none" to inherit the terminal default — perfect for themes that should melt into your terminal’s own color scheme:

  • "text": "none" — the terminal’s default foreground
  • "background": "none" — the terminal’s default background

Example

A full custom theme might look like this:

my-theme.json
{
"$schema": "https://kodine.net/theme.json",
"defs": {
"nord0": "#2E3440",
"nord1": "#3B4252",
"nord2": "#434C5E",
"nord3": "#4C566A",
"nord4": "#D8DEE9",
"nord5": "#E5E9F0",
"nord6": "#ECEFF4",
"nord7": "#8FBCBB",
"nord8": "#88C0D0",
"nord9": "#81A1C1",
"nord10": "#5E81AC",
"nord11": "#BF616A",
"nord12": "#D08770",
"nord13": "#EBCB8B",
"nord14": "#A3BE8C",
"nord15": "#B48EAD"
},
"theme": {
"primary": {
"dark": "nord8",
"light": "nord10"
},
"secondary": {
"dark": "nord9",
"light": "nord9"
},
"accent": {
"dark": "nord7",
"light": "nord7"
},
"error": {
"dark": "nord11",
"light": "nord11"
},
"warning": {
"dark": "nord12",
"light": "nord12"
},
"success": {
"dark": "nord14",
"light": "nord14"
},
"info": {
"dark": "nord8",
"light": "nord10"
},
"text": {
"dark": "nord4",
"light": "nord0"
},
"textMuted": {
"dark": "nord3",
"light": "nord1"
},
"background": {
"dark": "nord0",
"light": "nord6"
},
"backgroundPanel": {
"dark": "nord1",
"light": "nord5"
},
"backgroundElement": {
"dark": "nord1",
"light": "nord4"
},
"border": {
"dark": "nord2",
"light": "nord3"
},
"borderActive": {
"dark": "nord3",
"light": "nord2"
},
"borderSubtle": {
"dark": "nord2",
"light": "nord3"
},
"diffAdded": {
"dark": "nord14",
"light": "nord14"
},
"diffRemoved": {
"dark": "nord11",
"light": "nord11"
},
"diffContext": {
"dark": "nord3",
"light": "nord3"
},
"diffHunkHeader": {
"dark": "nord3",
"light": "nord3"
},
"diffHighlightAdded": {
"dark": "nord14",
"light": "nord14"
},
"diffHighlightRemoved": {
"dark": "nord11",
"light": "nord11"
},
"diffAddedBg": {
"dark": "#3B4252",
"light": "#E5E9F0"
},
"diffRemovedBg": {
"dark": "#3B4252",
"light": "#E5E9F0"
},
"diffContextBg": {
"dark": "nord1",
"light": "nord5"
},
"diffLineNumber": {
"dark": "nord2",
"light": "nord4"
},
"diffAddedLineNumberBg": {
"dark": "#3B4252",
"light": "#E5E9F0"
},
"diffRemovedLineNumberBg": {
"dark": "#3B4252",
"light": "#E5E9F0"
},
"markdownText": {
"dark": "nord4",
"light": "nord0"
},
"markdownHeading": {
"dark": "nord8",
"light": "nord10"
},
"markdownLink": {
"dark": "nord9",
"light": "nord9"
},
"markdownLinkText": {
"dark": "nord7",
"light": "nord7"
},
"markdownCode": {
"dark": "nord14",
"light": "nord14"
},
"markdownBlockQuote": {
"dark": "nord3",
"light": "nord3"
},
"markdownEmph": {
"dark": "nord12",
"light": "nord12"
},
"markdownStrong": {
"dark": "nord13",
"light": "nord13"
},
"markdownHorizontalRule": {
"dark": "nord3",
"light": "nord3"
},
"markdownListItem": {
"dark": "nord8",
"light": "nord10"
},
"markdownListEnumeration": {
"dark": "nord7",
"light": "nord7"
},
"markdownImage": {
"dark": "nord9",
"light": "nord9"
},
"markdownImageText": {
"dark": "nord7",
"light": "nord7"
},
"markdownCodeBlock": {
"dark": "nord4",
"light": "nord0"
},
"syntaxComment": {
"dark": "nord3",
"light": "nord3"
},
"syntaxKeyword": {
"dark": "nord9",
"light": "nord9"
},
"syntaxFunction": {
"dark": "nord8",
"light": "nord8"
},
"syntaxVariable": {
"dark": "nord7",
"light": "nord7"
},
"syntaxString": {
"dark": "nord14",
"light": "nord14"
},
"syntaxNumber": {
"dark": "nord15",
"light": "nord15"
},
"syntaxType": {
"dark": "nord7",
"light": "nord7"
},
"syntaxOperator": {
"dark": "nord9",
"light": "nord9"
},
"syntaxPunctuation": {
"dark": "nord4",
"light": "nord0"
}
}
}