Skip to content

Latest commit

 

History

History
162 lines (129 loc) · 5.41 KB

File metadata and controls

162 lines (129 loc) · 5.41 KB

Xscriptor Themes for OpenCode

A collection of themes for OpenCode based on the Xscriptor terminal color schemes. These themes are derived from the ANSI color palettes defined in the colors.md specification and translated into OpenCode's full semantic theme format.

Available Themes

Theme Type Description
x Dark Deep dark background with vibrant pink, green, and cyan accents
madrid Light Clean light background with deep red, green, and blue tones
lahabana Dark Dark gray background with bright neon accents
miami Dark True black background with vibrant synthwave-inspired colors
paris Dark Deep purple-black background with pastel cyan and blue accents
tokio Dark Dark gray background with balanced warm and cool tones
oslo Dark Dark blue-gray background with professional muted palette
helsinki Light Near-white background with earthy, natural tones
berlin Dark True black background with monochrome grayscale palette
london Light White background with sophisticated grayscale tones
praha Dark Dark background with Dracula-inspired vibrant colors
bogota Dark Deep maroon-black background with cyan and warm accents

Installation

Prerequisites

  • OpenCode installed
  • Your terminal must support truecolor (24-bit color). Run echo $COLORTERM to verify it outputs truecolor or 24bit

Option 1: Automated Install (Recommended)

Run the install script directly from GitHub:

curl -fsSL https://raw.githubusercontent.com/xscriptor/opencode/main/themes/xscriptor-themes/install.sh | bash

Or clone the repository and run the script locally:

git clone https://github.com/xscriptor/opencode.git
cd opencode/themes/xscriptor-themes
chmod +x install.sh
./install.sh

Option 2: Manual Install

Copy the theme files to the OpenCode themes directory:

# Create the themes directory if it doesn't exist
mkdir -p ~/.config/opencode/themes

# Copy all themes
cp colors/*.json ~/.config/opencode/themes/

Usage

Once installed, select a theme in OpenCode using the /theme command inside the TUI, or set it directly in your tui.json configuration file:

{
  "$schema": "https://opencode.ai/tui.json",
  "theme": "x"
}

Replace "x" with any of the available theme names (madrid, lahabana, miami, paris, tokio, oslo, helsinki, berlin, london, praha, bogota).

Theme Locations

OpenCode loads themes from the following directories, with later directories overriding earlier ones:

  1. Built-in themes - embedded in the binary
  2. User config directory - ~/.config/opencode/themes/*.json
  3. Project root directory - .opencode/themes/*.json
  4. Current working directory - ./.opencode/themes/*.json

For personal use, install to ~/.config/opencode/themes/. For project-specific themes, use .opencode/themes/ in your project root.

Theme Format

Each theme follows the OpenCode theme specification. The structure includes:

  • defs - Color definitions referencing the original ANSI terminal palette
  • theme - Semantic color mappings for the OpenCode UI, including syntax highlighting, markdown rendering, diff views, and interface elements

All themes reference the https://opencode.ai/theme.json schema for validation and editor autocompletion.

Repository Structure

themes/xscriptor-themes/
  colors/          # Theme JSON files (one per color scheme)
    x.json
    madrid.json
    ...
  install.sh       # Automated installation script
  README.md        # This file

Source

The original ANSI color definitions are documented in colors.md at the repository root.

License

MIT