Themes & Color Schemes
VimSheet integrates with Textual’s built-in theme system. When you switch themes, the spreadsheet grid, sheet tabs, formula bar, and status bar update automatically — every colour is derived from the theme’s CSS variables at runtime.
Available Themes
dark light nord gruvbox
dracula tokyo monokai solarized
solarized-light catppuccin rose-pine
To apply a theme from the command line:
:theme nord
:theme gruvbox
:theme dracula
The :theme command accepts short aliases (dark / light) and
theme names interchangeably.
How It Works
The spreadsheet grid is divided into 27 colour roles (header background, cursor cell colour, gridline colour, tab colours, mode indicator colours, etc.). Each role is automatically derived from Textual’s built-in CSS variables:
cursor_cell_bg→$primaryheader_bg→$surface(darkened slightly)alt_row_bg→$surface(lightened slightly)visual_sel_bg→$primaryblended with$surfacemode_normal→$successmode_insert→$warningmode_edit→$errormode_command→$primarymode_visual→$accentblended with$surface… and 18 more roles
This means every built-in Textual theme produces a sensible, matching grid palette with no manual configuration.
The :colorscheme Command
You can inspect and tweak individual palette fields at runtime:
List all current colours
:colorscheme
Shows the first few palette field values in the status bar.
Set a single field
:colorscheme cursor_cell_bg $primary
:colorscheme header_bg #2e3440
:colorscheme gridline red
:colorscheme alt_row_bg $surface
The value can be:
A
$variablereference (e.g.$primary,$surface,$error) — always resolves to the current theme’s valueA hex colour (e.g.
#ff0000,#2e3440)A named colour (e.g.
red,steelblue,ansi_bright_green)
Reset to theme defaults
:colorscheme reset # reset all fields
:colorscheme reset header_bg # reset a single field
Save overrides
Override changes are temporary until saved. Once saved they persist across sessions and re-apply every time you use that theme:
:colorscheme header_bg #2e3440
:colorscheme cursor_cell_bg $primary
:colorscheme save # writes overrides to config.json
Saved overrides are theme-scoped, so different themes can have different overrides.
Per-Theme Configuration
You can also define overrides directly in ~/.config/vimsheet/config.json.
Every palette field listed below can be overridden.
For example, to customise the nord theme:
{
"theme": "nord",
"theme_overrides": {
"nord": {
"cursor_cell_bg": "#88c0d0",
"header_bg": "#2e3440",
"gridline": "#434c5e",
"tab_active_bg": "#88c0d0",
"mode_insert": "$warning"
},
"gruvbox": {
"alt_row_bg": "#3c3836"
}
}
}
These overrides are resolved each time the theme is applied, so you can use
Textual $variable references (e.g. $primary, $surface, $warning)
and they will resolve to the current theme’s value at load time:
{
"theme_overrides": {
"nord": {
"cursor_cell_bg": "$primary",
"header_bg": "$surface"
}
}
}
Palette Fields Reference
Grid — Headers
Field |
Default derivation |
Used for |
|---|---|---|
|
|
Column & row header background |
|
|
Column & row header text |
|
|
Divider characters between headers |
Grid — Cursor
Field |
Default derivation |
Used for |
|---|---|---|
|
|
Active cell background |
|
|
Active cell text |
|
|
Header at cursor row/column |
|
|
Header text at cursor |
Grid — Visual Selection
Field |
Default derivation |
Used for |
|---|---|---|
|
|
Visual selection background |
|
|
Visual selection text |
Grid — Lines & Alternating Rows
Field |
Default derivation |
Used for |
|---|---|---|
|
|
Grid line colour |
|
|
Alternating row background |
Grid — Frozen Panes
Field |
Default derivation |
Used for |
|---|---|---|
|
|
Frozen row/column separator |
|
|
Frozen header background |
|
|
Frozen cell background |
Grid — Error
Field |
Default derivation |
Used for |
|---|---|---|
|
|
Formula error indicator |
Sheet Tabs
Field |
Default derivation |
Used for |
|---|---|---|
|
|
Active tab background |
|
|
Active tab text |
|
|
Inactive tab background |
|
|
Inactive tab text |
|
|
“+” button background |
Formula Bar
Field |
Default derivation |
Used for |
|---|---|---|
|
|
Edit cursor highlight in formula bar |
Mode Indicator Colours
Field |
Default derivation |
Used for |
|---|---|---|
|
|
NORMAL mode label |
|
|
INSERT mode label |
|
|
EDIT mode label |
|
|
COMMAND mode label |
|
|
VISUAL mode label |