Theme system for VS Code with perceptual hierarchy and a fork-friendly structure. Inspired by the Gruvbox project and its overall structure.
- Base: main mode with soft and vivid contrast adjustments
- High-Contrast: separate cognitive mode with internal soft and vivid adjustments
- Soft and Vivid adjust only neutrals without changing semantic hues
Dependencies (required before install):
- Node.js and npm
- VS Code
- VSCE (
npm install -g @vscode/vsce)
Local build and install:
npm install
npm run build:all
npx vsce package
code --install-extension space-rider-*.vsix
If code is not on PATH, install the VS Code shell command and try again.
Cinema pulp style, minimal and readable:
- Titles (primary): Bebas Neue - https://fonts.google.com/specimen/Bebas+Neue
- Body text: Inter (or neutral sans-serif) - https://fonts.google.com/specimen/Inter
- Code (editor): Space Mono as primary, with optional alternatives
You only need 2 to 3 fonts total:
- Bebas Neue for titles
- Inter for body text
- One mono font for code
- Space Mono (primary): https://fonts.google.com/specimen/Space+Mono
- Courier Prime (optional): https://fonts.google.com/specimen/Courier+Prime
- IBM Plex Mono (optional): https://fonts.google.com/specimen/IBM+Plex+Mono
- Victor Mono (optional): https://rubjo.github.io/victor-mono/
- JetBrains Mono (optional): https://www.jetbrains.com/lp/mono/
VS Code cannot enforce fonts via themes. You must install the fonts on your system and then set them in VS Code.
How to set fonts in VS Code:
- Open Settings and search for "Font Family"
- Or open Command Palette and run "Preferences: Open Settings (JSON)"
- Add the settings below
{
"editor.fontFamily": "Space Mono, Courier Prime, IBM Plex Mono, Victor Mono, JetBrains Mono, monospace",
"editor.fontLigatures": true,
"editor.fontWeight": "400"
}
VS Code does not allow themes to change the UI font. If you want the UI (menus, sidebar, tabs) to use Space Mono, you can inject a small CSS file with a Custom CSS extension.
- Install the extension: https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css
- Create a CSS file, for example
~/.config/Code/User/custom-ui.css:
/* Custom UI font */
:root,
body,
.monaco-workbench,
.monaco-workbench * {
font-family: "Space Mono", system-ui, Ubuntu, "Droid Sans", sans-serif !important;
}- Add this to
settings.json:
- Command Palette:
Enable Custom CSS and JS - Restart VS Code
Downloads:
- Bebas Neue: https://fonts.google.com/specimen/Bebas+Neue
- Inter: https://fonts.google.com/specimen/Inter
Place downloaded fonts in ~/.local/share/fonts/ (user) or /usr/local/share/fonts/ (system).
- Download the
.ttffiles - Copy to
~/.local/share/fonts/(user) or/usr/local/share/fonts/(system) - Refresh font cache:
fc-cache -f -v- Restart apps (VS Code, terminals)
Place downloaded fonts in C:\\Windows\\Fonts (or use the Install action).
- Extract the font zip
- Right-click the
.ttffiles and choose "Install" or "Install for all users" - Alternative: copy to
C:\\Windows\\Fonts - Restart apps
src/
├── modes/
│ ├── base/
│ │ ├── palette/ # base canonical palette
│ │ └── variants/ # soft/vivid for base mode
│ ├── high-contrast/
│ │ ├── palette/ # high-contrast palette
│ │ └── variants/ # soft/vivid for high-contrast mode
│ ├── paletteTypes.ts # shared keys and types
│ └── variantNeutrals.ts # neutral adjustments (soft/vivid)
├── tokens/ # syntax and semantic tokens
├── workbench/ # UI colors
├── themes/ # theme composition and registry
└── build.ts # JSON generation
themes/ # VS Code JSON output
- Duplicate a palette
- Base: copy
src/modes/base/palette/ - High-Contrast: copy
src/modes/high-contrast/palette/
- Base: copy
- Adjust only the colors listed in the relevant SPEC
- Create a theme in
src/themes/usingcreateThemeFromPalette - Register the output in
src/themes/registry.ts - Add the new entry to
package.json
Example (theme from a new palette):
import { createThemeFromPalette } from "./index";
import { paletteMyTheme } from "./modes/my-mode/palette";
export const myTheme = createThemeFromPalette(
"Space Rider My Theme",
paletteMyTheme,
);- Semantic hierarchy over style
- Saturation does not define importance
- UI must recede behind code
- Colors have function, not decoration
MIT. Forks are encouraged.
{ "vscode_custom_css.imports": [ "file:///home/your-user/.config/Code/User/custom-ui.css" ] }