Skip to content

Themes

Lokus uses a token-based theme system. Every color in the UI maps to a CSS variable, and switching themes swaps those variables instantly. The default theme is Lokus Dark.

Lokus ships with four built-in themes (two signature themes and two community favorites):

ThemeStyleAccent color
Lokus DarkDarkAmber/orange (#e0a872)
Lokus LightLightBurnt orange (#c27830)
Rose PineDarkLavender (#c4a7e7)
Tokyo NightDarkBlue (#7aa2f7)

An additional community theme, One Dark Pro (dark, blue accent #61afef), is available as a JSON file in src/themes/ but is not included in the default set.

  1. Open Preferences and go to the Appearance section.
  2. Select a theme from the theme dropdown.
  3. The theme applies immediately across all open windows.

Theme changes propagate via Tauri events, so every window updates in real time. On macOS, the native titlebar appearance syncs automatically whenever a theme is applied.

A theme picker is also shown during onboarding for first-time setup.

Every theme defines values for CSS variables. Theme files use the --app- prefix for core tokens (e.g. --app-bg, --app-text). The theme manager maps these to their unprefixed equivalents (--bg, --text) at apply time, so both forms work in CSS.

These seven tokens define the foundation of a theme. They are not strictly required because any missing tokens are automatically merged with the Lokus Dark defaults, but providing them is strongly recommended:

TokenDescription
--bgBackground color
--textPrimary text color
--panelPanel/sidebar background
--borderBorder color
--mutedMuted/secondary text
--accentAccent/highlight color
--accent-fgText color on accent backgrounds

Theme JSON files support additional tokens beyond the core set. These are used by the full theme files shipped in src/themes/:

TokenDescription
--app-panel-secondarySecondary panel background
--app-border-hoverBorder color on hover
--app-text-secondarySecondary text color
--accent-hoverAccent color on hover
--canvas-bgCanvas background
--canvas-gridCanvas grid line color
--graph-bg-primaryGraph view primary background
--graph-bg-secondaryGraph view secondary color
--graph-node-documentGraph document node color
--graph-node-placeholderGraph placeholder node color
--graph-node-tagGraph tag node color
--graph-node-folderGraph folder node color
--graph-linkGraph link color
--graph-link-hoverGraph link hover color
TokenDescription
--task-todoTodo task color
--task-progressIn-progress color
--task-urgentUrgent task color
--task-questionQuestion task color
--task-completedCompleted color
--task-cancelledCancelled color
--task-delegatedDelegated color
TokenDescription
--dangerError/danger
--successSuccess
--warningWarning
--infoInformational
TokenDescription
--tab-activeActive tab background
--editor-placeholderEditor placeholder text

Token values can be either:

  • Hex: #282a36 or #fff
  • RGB space-separated: 40 42 54

Hex values are automatically converted to RGB for use with Tailwind’s opacity utilities.

Create a JSON file with a name and tokens object. Any tokens you omit are filled in from the Lokus Dark defaults, so you only need to specify the values you want to change:

{
"name": "My Custom Theme",
"tokens": {
"--app-bg": "#1a1b26",
"--app-text": "#a9b1d6",
"--app-panel": "#16161e",
"--app-border": "#414868",
"--app-muted": "#565f89",
"--accent": "#7aa2f7",
"--accent-fg": "#1a1b26",
"--danger": "#f7768e",
"--success": "#9ece6a",
"--warning": "#e0af68",
"--info": "#7dcfff",
"--editor-placeholder": "#565f89"
}
}

The theme ID is generated from the name: lowercased, with non-alphanumeric characters replaced by underscores.

In Preferences > Appearance, you can edit individual token values for the active theme directly. Changes preview live as you type — the UI updates immediately via applyTokens(). Click Save Changes to persist edits, or navigate away to discard them (tokens revert to the last saved state).

Import a theme from a JSON file:

  1. In Preferences, click the Import button and select a .json theme file.
  2. Lokus validates the file structure and color formats.
  3. The theme appears in your theme list and is automatically selected.

Set overwrite: true (via the API) to replace an existing theme with the same ID.

Export any theme (including built-in ones) to a JSON file for sharing or backup. In Preferences, click Export and choose a save location.

Custom themes can be deleted through the theme management API or MCP tools. Built-in themes cannot be deleted.

Set the theme to system or auto to follow your operating system’s light/dark preference. Lokus listens for system theme changes and switches automatically between lokus-dark and lokus-light. On macOS, this syncs with the native titlebar appearance.

Every time a theme is applied, Lokus invokes sync_window_theme on the Rust backend, passing the background color luminance. This keeps the macOS native titlebar appearance (light or dark chrome) consistent with the active theme.

Each workspace can override the global theme. Add a theme key to .lokus/config.json inside the workspace:

{
"theme": "rose-pine"
}

Set the value to "inherit" (or omit it) to use the global theme. If no theme is configured at any level, Lokus defaults to lokus-dark.

AI assistants can manage themes through the MCP server. The following tools are available:

ToolDescription
list_themesList all available themes (built-in and custom)
get_themeGet a theme’s details and token values
create_themeCreate a new custom theme with specified colors
update_themeUpdate an existing theme’s tokens (partial updates)
delete_themeDelete a custom theme
apply_themeApply a theme to the application
get_current_themeGet the currently active theme
export_themeExport a theme to a JSON file
import_themeImport a theme from a JSON file

These tools validate color formats and enforce that built-in themes cannot be deleted.

Plugins can contribute themes through the theme contribution schema. Plugin-contributed themes support metadata including category, tags, author, preview colors, and accessibility flags like high-contrast and color-blind-friendly indicators.