A warm, tech-dystopian color scheme inspired by corrupted hardware and failing systems. digitalrust.katsuricata.com
2.5 kB · 65 lines
Markdown
at main

Digital Rust theme for OpenCode #

A warm, tech-dystopian color scheme for the OpenCode terminal client. One file holds both modes. Digital Rust is the dark mode, and Safe Mode is the light projection.

Install #

  1. Copy digital-rust.json to ~/.config/opencode/themes/.
  2. Select the theme in ~/.config/opencode/cli.json.
{
  "theme": {
    "name": "digital-rust",
    "mode": "dark"
  }
}

For one project only, put the file in .opencode/themes/ inside the project tree. A theme in the project replaces a global theme with the same name.

You can also press Ctrl+P, select Open settings, and open Theme.

Modes #

Value Result
dark Digital Rust, the base theme
light Digital Rust: Safe Mode, the accessibility option
system The mode follows the appearance of the terminal

How the palette maps #

OpenCode reads its colors from one token tree, and the theme fills that tree from the Digital Rust role table. Most tokens map one to one: the page is --dr-surface-base, body text is --dr-text-primary, a primary action is --dr-accent, and the container wall is --dr-border-color-container.

Three OpenCode tokens have no exact Digital Rust counterpart.

  • OpenCode has no token for a chrome surface. The theme gives panels, menus, and dialogs --dr-surface-elevated, because OpenCode uses one raised token for all of them. --dr-surface-secondary appears only as the diff context fill.
  • OpenCode has no token for a hot panel. A Digital Rust status bar and toast are Bricked Board. OpenCode paints both with the raised surface, so they take Core Meltdown.
  • OpenCode has no token for a well inside a panel, so an input uses --dr-surface-base in both modes. Safe Mode draws the recess with the control wall and the inner lowlight, as the UI specification describes.

Raw Amber Alert carries no legible text in either mode, so the destructive action uses Firewall Breach. That is the hover fill of the error button in the UI specification.

Muted text keeps the translucent wash from the palette. The renderer blends it, so the wash holds 4.5:1 on every surface it can sit on.

Every declared color pair clears its WCAG floor. Run pnpm contrast from the repository root to measure them.

License #

Dual-licensed (choose either to follow, not both) under CC-BY-4.0 and Apache-2.0.