Diffs

Pierre themes

Beautiful light and dark themes, generated from a shared color palette, for Visual Studio Code, Cursor, and Shiki. Built first for @pierre/diffs, and shared with the community by The Pierre Computer Company.

Usage

Install the Pierre theme pack from your editor's extension marketplace:

  1. Visual Studio Code — Install from the VS Code Marketplace
  2. Cursor — Install from Open VSX
  3. Zed — Coming soon

Then open your editor and select "Pierre Dark" or "Pierre Light" in settings or the command palette.

Building Your Own Theme

Create custom syntax highlighting themes for use with @pierre/diffs (plus Shiki and Visual Studio Code based editors) by forking our open-source Pierre Theme repository.

The Pierre themes are also bundled with @pierre/diffs as pierre-dark and pierre-light, so you can use them without any additional setup.

Getting Started

The fastest way to create a custom theme is to fork the Pierre Theme repo and modify the color palette. The repo uses TypeScript to generate theme JSON files, giving you type safety and the ability to generate multiple theme variants from a single color palette.

  1. Fork the repo — Visit github.com/pierrecomputer/theme and click "Fork" to create your own copy
  2. Clone your forkgit clone https://github.com/YOUR_USERNAME/theme.git
  3. Install dependenciesnpm install
  4. Start the dev servernpm start (watches for changes and rebuilds)

Project Structure

The Pierre Theme repo is organized as follows:

Customizing the Color Palette

The src/palette.ts file is the single source of truth for all colors in your theme. Modify these values to create your own color scheme:

After editing your palette, the build script automatically regenerates all theme variants. Each color in the palette is used consistently across light theme, dark theme, and vibrant variants.

Updating Token Colors

The src/theme.ts file maps your palette colors to specific syntax tokens. This is where you control which colors are used for comments, strings, keywords, and other code elements:

For a complete reference of TextMate scopes, see the VS Code syntax highlighting documentation and the TextMate language grammars manual.

Building and Testing

The repo includes several npm scripts for development:

ScriptDescription
npm startWatch mode — rebuilds on file changes
npm run buildGenerate theme JSON files in ./themes directory
npm testValidate theme structure (runs build first)
npm run packageCreate .vsix file for VS Code/Cursor publishing

Updating package.json

Before publishing your theme, update the package.json with your own details:

Using Your Theme with Diffs

Once you've built your theme JSON files, you can use them with @pierre/diffs by registering them before rendering:

Then reference your theme in any component:

Display P3 Vibrant Themes

The Pierre Theme repo automatically generates "Vibrant" variants that use the Display P3 color space for ~25% more color range on compatible displays.

Display P3 colors are not supported in VS Code or Cursor. However, they work perfectly in Shiki for web rendering, including with @pierre/diffs.

The vibrant variants are generated automatically when you run npm run build. They use enhanced saturation to push colors into the wider P3 gamut. See the repo's DISPLAY-P3.md for technical details on the color conversion algorithm.

Publishing Your Theme

To publish your theme to the VS Code Marketplace or Open VSX:

  1. Update package.json with your publisher ID and theme metadata
  2. Run npm run package to create the .vsix file
  3. Upload to the VS Code Marketplace or Open VSX

For Shiki/web use only, you can skip publishing and simply host your theme JSON files or bundle them with your application.

With love from The Pierre Computer Company

Collectively, our team brings over 150 years of expertise designing, building, and scaling the world's largest distributed systems at Cloudflare, Coinbase, Discord, GitHub, Reddit, Stripe, X, and others.