CL

ColorLoom

A powerful Rust CLI for generating consistent color themes across multiple editors and terminals from a single theme.toml configuration.

Features

📄

Single Source of Truth

Define colors once in theme.toml, generate for all platforms

🎨

Variant Support

Automatically generates base, hazy (75%), and cloudy (90%) variants

Blur Effects

Full support for Zed's background.appearance: "blurred"

🎯

Comprehensive Coverage

100+ color settings per target for complete UI theming

Installation

From crates.io

cargo install colorloom

From source

cd tools/colorloom
cargo install --path .

Usage

Terminal
# Generate all themes (default command)
$ colorloom generate
# Validate configuration
$ colorloom validate
# List targets and variants
$ colorloom list
# Use custom config file
$ colorloom -c custom-theme.toml generate

Supported Targets

Target Output Variants
Zed
Single JSON with all variants base, hazy, cloudy
📝 VS Code / Cursor
Separate JSON per variant base, hazy, cloudy
🌙 Neovim
Lua colorscheme files base, hazy, cloudy
👻 Ghostty
Terminal palette files base, hazy, cloudy
🌐 Website
JSON for web showcase palette data

Transparency & Blur

ColorLoom automatically handles transparency for blur-enabled variants, creating a seamless experience across Zed's blurred window modes.

Variant Alpha Editor Background Appearance
Base 100% Opaque (#191724FF) opaque
Hazy 75% Transparent (#19172400) blurred
Cloudy 90% Transparent (#19172400) blurred

For Blurred Variants

  • Editor and gutter backgrounds are fully transparent (00) to show blur
  • Surfaces and panels use variant alpha for layering
  • Tabs and toolbars use reduced opacity for subtle differentiation

Zed Integration

  • Sets background.appearance: "blurred"
  • Works with macOS window vibrancy
  • Graceful fallback on unsupported platforms

Configuration

ColorLoom reads from theme.toml in the current directory. Here's an example configuration:

theme.toml
version = "1"

[meta]
name = "Subliminal Nightfall"
author = "Michael Hamrah"
description = "A dark color scheme with purple-black backgrounds"
license = "MIT"

# ANSI terminal colors with base/bright/dim variants
[palette.base.ansi.red]
base = "#bf616a"
bright = "#e2848d"
dim = "#85434a"

[palette.base.ansi.green]
base = "#a9cfa4"
bright = "#ccf2c7"
dim = "#769072"

# Syntax highlighting colors
[palette.syntax]
teal = "#9ccfd8"
blue_green = "#31748f"
lavender = "#c4a7e7"
gray = "#7f7f7f"

# UI colors
[palette.ui]
background = "#191724"
background_alt = "#1f1d2e"
background_elevated = "#26233a"
foreground = "#e0def4"
foreground_muted = "#a0a0a0"
foreground_dim = "#7f7f7f"
selection = "#484e5b"
cursor = "#5fb3b3"
line_highlight = "#2e3239bf"

# Border colors
[palette.border]
border = "#484e5b"
border_variant = "#363b45"
border_focused = "#6699cc"
border_selected = "#5fb3b3"

# Theme variants
[[variants]]
name = "base"
alpha = 1.0

[[variants]]
name = "hazy"
alpha = 0.75
blur_radius = 20

[[variants]]
name = "cloudy"
alpha = 0.90
blur_radius = 12

# Target configurations
[[targets]]
id = "zed"
enabled = true
path = "zed/themes"
out_file = "subliminal-nightfall.json"

[[targets]]
id = "cursor"
enabled = true
path = "cursor/themes"
out_names = { 
  base = "subliminal-nightfall-color-theme.json",
  hazy = "subliminal-nightfall-color-theme-hazy.json",
  cloudy = "subliminal-nightfall-color-theme-cloudy.json"
}

Architecture

Project Structure
colorloom/
├── src/
│   ├── main.rs      # CLI entry point
│   ├── config.rs    # TOML configuration types
│   └── targets.rs   # Theme generators per target
├── Cargo.toml
└── README.md
📄

main.rs

CLI parsing with clap, command routing

⚙️

config.rs

Serde structs for theme.toml parsing

🎨

targets.rs

Platform-specific theme generators

Ready to generate your themes?

Install ColorLoom and start creating consistent themes across all your editors.