Digital Rust Syntax Highlighting Specification
Official syntax highlighting and design specification for the Digital Rust theme.
Overview
Digital Rust is a warm, tech-dystopian color scheme inspired by corrupted hardware and failing systems. Built around deep rust-copper tones with strategic pops of color named after system failures, the theme delivers a unique visual experience that embraces the beauty of digital decay while maintaining excellent readability and productivity.
// signal: digital rust boot sequence
fn boot_sequence() -> Result<SystemState, KernelPanic> {
let checksum = hash("ghost-pixel")?;
if checksum < 0xAF2E1A {
return Err(KernelPanic::CorruptedCache);
}
Ok(SystemState::Operational)
}Color Palette
Main Colours
| Hex Code | Name | Description |
|---|---|---|
| #F7EAE8 | Ghost Pixel | Lightest / White Point (text) |
| #EFD5D1 | Phosphor Smoke | |
| #E7C0BA | Phantom Current | Link Colour/Footer Text |
| #DFABA3 | Corrupted Cache | |
| #D7968C | Copper Trace | |
| #CF8175 | Fatal Error | |
| #C76C5E | Rouge Signal | |
| #BF5747 | Amber Alert | |
| #B74230 | Firewall Breach | |
| #AF2E1A | Digital Rust | Primary Colour/Primary Accent |
| #9D2917 | Kernel Panic | |
| #8C2414 | Data Rot | |
| #7A2012 | Bricked Board | |
| #691B0F | Dark Packet | |
| #57170D | Daemon Blood | |
| #46120A | Bad Sector | |
| #340D07 | Core Meltdown | Secondary Background Colour |
| #230905 | Null Pointer | |
| #110402 | Event Horizon | Darkest/Black Point (background) |
ANSI Colours
Green
DimGreen
BrightGreen
Yellow
DimYellow
BrightYellow
Blue
DimBlue
BrightBlue
Magenta
DimMagenta
BrightMagenta
Cyan
DimCyan
BrightCyan
Orange
DimOrange
BrightOrange
| Hex Code | ANSI Colour | Name |
|---|---|---|
| #8FA667 | Green | Memory Leek |
| #627247 | DimGreen | Dim 〃 |
| #94A577 | BrightGreen | Bright 〃 |
| #D4A759 | Yellow | Stack Overglow |
| #A07E43 | DimYellow | Dim 〃 |
| #D3AE6E | BrightYellow | Bright 〃 |
| #8791B0 | Blue | Blue Screen |
| #60677C | DimBlue | Dim 〃 |
| #999EAF | BrightBlue | Bright 〃 |
| #BA5A7D | Magenta | Fractured Shell |
| #87405A | DimMagenta | Dim 〃 |
| #BA6B88 | BrightMagenta | Bright 〃 |
| #6FA5A0 | Cyan | Dead Thread |
| #4C726E | DimCyan | Dim 〃 |
| #7FA5A1 | BrightCyan | Bright 〃 |
| #D78556 | Orange | Thermal Throttle |
| #AC6D4A | DimOrange | Dim 〃 |
| #D6926B | BrightOrange | Bright 〃 |
Syntax Highlighting Rules
Token Classification
Following TextMate scoping conventions for consistent highlighting across editors. These conventions keep highlighting consistent across editors.
Primary Tokens
Keywords & Storage → Fatal Error (#CF8175)
- Language Keywords:
if,else,return,function,class - Storage Modifiers:
static,public,private,const,let,var - Control Flow:
try,catch,throw,break,continue
Functions & Methods → Stack Overglow (#D4A759)
- Function Declarations and Calls
- Method Invocations
- User-defined Functions
Classes & Types → Dead Thread (#6FA5A0)
- Class Names and Constructors
- Type Annotations:
int,string,boolean - Interfaces and Enums
- Generic Type Parameters
Strings & Text → Memory Leek (#8FA667)
- String Literals:
"corrupted",'failed',`template` - Escape Sequences (e.g.,
\n,\t)
Numbers → Thermal Throttle (#D78556)
- Numeric Literals:
42,3.14,0xFF,1e5
Constants & Special Values → Bright Stack Overglow (#D3AE6E)
- Boolean Values:
true,false - Null-like Constants:
null,undefined,nil,None - Special Language Values:
NaN,Infinity,this,self,super - Named Constants:
SOME_CONST,MAX_SIZE,DEFAULT_TIMEOUT - Enum Values:
Status.OK,Color.RED,HttpStatus.NOT_FOUND - Language-level Constants:
__name__,__FILE__,M_PI,E
Design Note: Booleans and null-like values use a distinct color from numbers. The distinct color marks their semantic role as special language constants, not numeric data.
Comments → Dim Thermal Throttle (#AC6D4A) italic
- Single-Line:
//,#,-- - Multi-Line:
/* */,<!-- --> - Documentation Blocks (JSDoc, Javadoc, docstrings)
Attributes & Decorators → Dead Thread (#6FA5A0) italic
- Java/Kotlin Annotations:
@Override,@Component,@Deprecated - Python Decorators:
@dataclass,@property,@staticmethod - Rust Attributes:
#[derive(Debug)],#[cfg(test)] - C# Attributes:
[Serializable],[HttpGet] - TypeScript Decorators:
@Injectable,@Component
Sigil Handling: The
@or#sigil inherits the decorator color. Style the sigil as part of the attribute token.
Support & Built-ins
Built-ins & Standard Library → Dim Stack Overglow (#A07E43)
- Built-in Functions:
print,len,typeof,console.log - Standard Library Classes:
Array,String,Object,Map - TextMate scopes:
support.function,support.class,support.type
Markup Tags (HTML/XML) → Dead Thread (#6FA5A0)
- Tag Names:
<div>,<span>,<svg> - Self-closing Tags:
<br/>,<img/> - TextMate scope:
entity.name.tag
Markup Attributes → Dim Stack Overglow (#A07E43)
- Attribute Names:
class,id,href,src - TextMate scope:
entity.other.attribute-name
Markup Attribute Values → Memory Leek (#8FA667)
- Quoted Values:
"container",'primary' - TextMate scope:
string.quotedwithin markup
Regular Expressions
- Regex Literals & Character Classes →
Memory Leek (#8FA667) - Regex Operators & Metacharacters (
+,*,?,|,^,$) →Copper Trace (#D7968C) - Regex Groups & Brackets →
Copper Trace (#D7968C)
Variables & Identifiers → Ghost Pixel (#F7EAE8)
- Variable Names and Parameters
- Object Properties
- Default Text Content
- TextMate scope:
variable,variable.parameter
Errors & Warnings → Amber Alert (#BF5747) (note: rendered text on dark backgrounds uses --amber-alert-text (#CB6353) for WCAG AA compliance)
- Syntax Errors
- Deprecated Code (with strikethrough where supported)
- Invalid Tokens
Operators & Punctuation
Operators → Copper Trace (#D7968C)
- Arithmetic:
+,-,*,/,%,** - Comparison:
==,!=,<,>,<=,>=,===,!== - Logical:
&&,||,!,and,or,not - Assignment:
=,+=,-=,*=,/= - Bitwise:
&,|,^,~,<<,>>
Punctuation & Delimiters → Copper Trace (#D7968C)
- Separators:
,,;,: - Accessors:
.,:: - Brackets:
(,),[,],{,} - Angle Brackets (generics):
<,>
Sigils & Prefix Symbols
- Sigils inherit the color of the token they modify:
$variable→ Variable color (Ghost Pixel)@decorator→ Decorator color (Dead Thread)&reference→ Context-dependent (variable or type)*pointer→ Context-dependent
Styling Modifiers
Bold
- Markdown headings (H1–H6)
- Strong emphasis in Markdown (
**text**) - Active tab labels in UI
- Critical warnings or alerts
Italic
- Comments and documentation blocks
- Type parameters and generics
- Decorators and attributes
- Markdown emphasis (
*text*) - Quoted text in documentation
Underline
- Links: Solid underline using
Phantom Current (#E7C0BA) - Spelling errors: Dotted underline using
Amber Alert (#BF5747) - Potential errors/warnings: Wavy underline using
Stack Overglow (#D4A759)
Accessibility Note: Distinguish links and spelling errors by underline style (solid vs. dotted), not by color alone.
Strikethrough
- Deprecated code or APIs
- Completed tasks in TODO comments
Special Rules
Scope Prioritization
If multiple scopes apply to one token, apply styles in this precedence order:
- Error scopes (highest priority) — Always override other styles
- Warning scopes — Override non-error styles
- Language-specific overrides — Per-language customizations
- Semantic token colors — LSP/semantic highlighting
- Base syntax colors (lowest priority) — TextMate grammar defaults
Rule: If a token is both an error and another role (for example, a misspelled keyword), the error style takes full precedence. The token shows the error styling, not a blend.
Bracket Matching
- Matching Brackets: Subtle highlight with
Bad Sector (#46120A)background - Unmatched Brackets:
Amber Alert (#BF5747)with wavy underline - Rainbow Brackets: Optional. If enabled, cycle through:
Dead Thread,Stack Overglow,Fractured Shell,Blue Screen,Thermal Throttle,Memory Leek
Language-Specific Rules
Configuration Languages (JSON/YAML/TOML)
Configuration files use a distinct key/value visual hierarchy:
Keys → Dead Thread (#6FA5A0)
- Object keys and property names
- YAML mapping keys
- TOML table headers and keys
Values → Standard token rules apply:
- Strings →
Memory Leek (#8FA667) - Numbers →
Thermal Throttle (#D78556) - Booleans/null →
Bright Stack Overglow (#D3AE6E)
Structural Elements → Copper Trace (#D7968C)
- Colons, commas, brackets
- YAML dashes for list items
Design Note: Keys and values use intentionally different colors. The difference makes the hierarchical structure immediately visible.
Markdown & Rich Text
Headings (H1–H6) → Fatal Error (#CF8175) bold
- Heading markers (
#,##, etc.) →Copper Trace (#D7968C)
Emphasis
- Bold (
**text**) →Ghost Pixel (#F7EAE8)bold - Italic (
*text*) →Ghost Pixel (#F7EAE8)italic - Bold Italic (
***text***) →Ghost Pixel (#F7EAE8)bold italic
Code
- Inline code (
`code`) →Memory Leek (#8FA667)onBad Sector (#46120A)background - Fenced code blocks → Normal syntax highlighting inside
- Code fence markers (
```) →Copper Trace (#D7968C)
Blockquotes → Phosphor Smoke (#EFD5D1) italic
- Quote markers (
>) →Copper Trace (#D7968C)
Links
- Link text →
Phantom Current (#E7C0BA)underlined - Link URL →
Dim Stack Overglow (#A07E43)
Lists
- List markers (
-,*,1.) →Copper Trace (#D7968C) - List content →
Ghost Pixel (#F7EAE8)
Horizontal Rules → Dark Packet (#691B0F)
HTML / XML / Templates
Core Markup
- Tag Names →
Dead Thread (#6FA5A0) - Attribute Names →
Dim Stack Overglow (#A07E43) - Attribute Values →
Memory Leek (#8FA667) - Text Nodes →
Ghost Pixel (#F7EAE8) - Comments →
Dim Thermal Throttle (#AC6D4A)italic
Angle Brackets & Delimiters → Copper Trace (#D7968C)
<,>,</,/>
Template Languages (JSX, Vue, Handlebars, EJS)
- Template Delimiters (
{},{{}},<%,%>) →Copper Trace (#D7968C) - Embedded Expressions → Follow host language syntax rules
- Component Names (PascalCase) →
Dead Thread (#6FA5A0)(treat as custom tags)
CSS & Stylesheets
Selectors
- Element Selectors →
Ghost Pixel (#F7EAE8) - Class Selectors (
.class) →Dead Thread (#6FA5A0) - ID Selectors (
#id) →Dead Thread (#6FA5A0) - Pseudo-classes/elements (
:hover,::before) →Dim Stack Overglow (#A07E43) - Attribute Selectors →
Dim Stack Overglow (#A07E43)
Properties & Values
- Property Names →
Dim Stack Overglow (#A07E43) - String Values →
Memory Leek (#8FA667) - Numeric Values →
Thermal Throttle (#D78556) - Units (
px,em,%,rem) →Dim Stack Overglow (#A07E43) - Color Values (hex, rgb, hsl) →
Thermal Throttle (#D78556) - Keywords (
auto,inherit,flex) →Bright Stack Overglow (#D3AE6E)
At-Rules
@media,@import,@keyframes→Fatal Error (#CF8175)
Utility-First (Tailwind and similar frameworks)
- Class Names in HTML →
Dead Thread (#6FA5A0)(treat as structural labels)
String Interpolation
String Containers → Memory Leek (#8FA667)
- Quote characters and literal text portions
Interpolated Expressions → Full syntax highlighting
- JavaScript:
${expression}— expression follows JS rules - Python f-strings:
{expression}— expression follows Python rules - Ruby:
#{expression}— expression follows Ruby rules - Shell:
${variable}or$(command)— follows shell rules
Interpolation Delimiters → Copper Trace (#D7968C)
${,},#{,{,}
Implementation Note: Tokenize interpolated segments as full expressions. Do not render them as plain string content.
Git & Diff Views
Diff Additions
- Text Color:
Ghost Pixel (#F7EAE8) - Background:
Memory Leek (#8FA667)at 15% opacity - Line Marker (
+):Memory Leek (#8FA667)
Diff Deletions
- Text Color:
Phantom Current (#E7C0BA) - Background:
Amber Alert (#BF5747)at 15% opacity - Line Marker (
-):Amber Alert (#BF5747)
Diff Modifications
- Background:
Dead Thread (#6FA5A0)at 10% opacity - Line Marker (
~):Dead Thread (#6FA5A0)
Diff Headers & Metadata
- File paths:
Stack Overglow (#D4A759) - Hunk headers (
@@):Blue Screen (#8791B0) - Commit hashes:
Dim Stack Overglow (#A07E43)
Inline Diff (word-level)
- Added words:
Memory Leek (#8FA667)background at 25% - Removed words:
Amber Alert (#BF5747)background at 25%
Shell & CLI Scripts (Bash, Zsh, Fish, PowerShell)
Commands & Executables → Stack Overglow (#D4A759)
- First word on a line (command name)
- Built-in commands:
echo,cd,export - External commands:
grep,awk,curl
Flags & Options → Fatal Error (#CF8175)
- Short flags:
-a,-v,-rf - Long flags:
--help,--verbose,--output
Variables → Ghost Pixel (#F7EAE8)
- Environment variables:
$PATH,$HOME,${VAR} - Positional parameters:
$1,$@,$# - Sigil (
$) inherits variable color per sigil rules
Here-Documents → Memory Leek (#8FA667)
- Here-doc body content follows string rules
- Delimiter tokens (
<<EOF,EOF) →Copper Trace (#D7968C)
Shebang Line → Dim Thermal Throttle (#AC6D4A) italic
#!/bin/bash,#!/usr/bin/env python- Treat as a special comment
SQL
Keywords → Fatal Error (#CF8175)
- DML:
SELECT,INSERT,UPDATE,DELETE - DDL:
CREATE,ALTER,DROP,TRUNCATE - Clauses:
FROM,WHERE,JOIN,ON,GROUP BY,ORDER BY,HAVING - Operators:
AND,OR,NOT,IN,BETWEEN,LIKE,IS NULL
Functions → Stack Overglow (#D4A759)
- Aggregate:
COUNT,SUM,AVG,MIN,MAX - Scalar:
COALESCE,NULLIF,CAST,CONVERT - Date/Time:
NOW,DATEADD,DATEDIFF
Types → Dead Thread (#6FA5A0)
VARCHAR,INT,BIGINT,BOOLEAN,TIMESTAMP,TEXT,DECIMAL
Identifiers → Ghost Pixel (#F7EAE8)
- Table names, column names
- Aliases (
AS name) — treat as variables
Strings & Numbers → Standard token rules
- String & char literals →
Memory Leek (#8FA667) - Numeric literals →
Thermal Throttle (#D78556)
C/C++ Preprocessor Directives
Preprocessor Keywords → Fatal Error (#CF8175)
#include,#define,#undef#if,#ifdef,#ifndef,#else,#elif,#endif#pragma,#error,#warning
Macro Names → Bright Stack Overglow (#D3AE6E)
- Defined constants:
MAX_SIZE,DEBUG_MODE - Treat as named constants
Macro Parameters → Ghost Pixel (#F7EAE8)
- Parameters in macro definitions follow
variable.parameterrules
Include Paths → Memory Leek (#8FA667)
<stdio.h>,"myheader.h"— treat as strings
Note: The
#sigil is part of the directive keyword, not a separate punctuation token.
Rust-Specific
Lifetimes → Dead Thread (#6FA5A0) italic
'a,'static,'_- The tick (
') is part of the lifetime token
Traits → Dead Thread (#6FA5A0)
- Trait names:
Clone,Debug,Iterator,Send,Sync - Trait bounds follow type coloring
Macros → Stack Overglow (#D4A759)
- Macro invocations:
println!,vec!,format! - The
!is part of the macro name
Note: Rust attributes (
#[derive],#[cfg]) are covered under Attributes & Decorators.
Haskell / ML / Functional Languages
Type Constructors → Dead Thread (#6FA5A0)
Maybe,Either,List,IO- Type-level names starting with uppercase
Data Constructors → Bright Stack Overglow (#D3AE6E)
Just,Nothing,Left,Right,True,False- Treat as constants (they are value-level names for types)
Type Signatures → Standard rules with explicit operators
::(type annotation) →Copper Trace (#D7968C)=>(constraint arrow) →Copper Trace (#D7968C)->(function arrow) →Copper Trace (#D7968C)
Type Variables → Dead Thread (#6FA5A0) italic
- Lowercase type parameters:
a,b,m - Distinguish them from term-level variables with italic
Editor UI Definitions
Editor Core
| Element | Color | Notes |
|---|---|---|
| Editor Background | Event Horizon (#110402) |
Primary editing surface |
| Gutter Background | Null Pointer (#230905) |
Line number area |
| Default Text | Ghost Pixel (#F7EAE8) |
Unrecognized tokens fallback |
| Line Numbers (inactive) | Bad Sector (#46120A) |
Non-current lines |
| Line Numbers (active) | Phantom Current (#E7C0BA) |
Current line |
| Cursor | Stack Overglow (#D4A759) |
Block or line cursor |
| Current Line Highlight | Core Meltdown (#340D07) at 50% |
Subtle emphasis |
Selection & Guides
| Element | Color | Notes |
|---|---|---|
| Selection Background | Dark Packet (#691B0F) at 70% |
Active selection |
| Inactive Selection | Dark Packet (#691B0F) at 40% |
Unfocused window |
| Indent Guides | Bad Sector (#46120A) |
Scope visualization |
| Active Indent Guide | Dark Packet (#691B0F) |
Current scope |
| Whitespace Characters | Bad Sector (#46120A) at 50% |
Spaces, tabs when visible |
| Matching Bracket BG | Bad Sector (#46120A) |
Bracket pair highlight |
Search & Navigation
| Element | Color | Notes |
|---|---|---|
| Search Match BG | Stack Overglow (#D4A759) at 30% |
All matches |
| Active Search Match | Digital Rust (#AF2E1A) border + Stack Overglow (#D4A759) at 50% fill |
Currently selected match |
| Find/Replace Error | Amber Alert (#BF5747) underline |
Invalid regex/pattern |
| Highlight on Scroll | Stack Overglow (#D4A759) at 20% |
Scrollbar match indicators |
Disabled & Placeholder States
| Element | Color | Notes |
|---|---|---|
| Disabled Text | Bad Sector (#46120A) |
On dark backgrounds |
| Disabled Text (alt) | Null Pointer (#230905) |
On lighter backgrounds |
| Placeholder Text | Phosphor Smoke (#EFD5D1) at 50% |
Input hints |
Accessibility Note: Disabled UI elements must meet minimum contrast where practical. If full contrast is not possible, add other visual cues (for example, reduced opacity or a different font weight).
Tabs
| Element | Color |
|---|---|
| Active Tab Background | Core Meltdown (#340D07) |
| Inactive Tab Background | Event Horizon (#110402) |
| Active Tab Text | Ghost Pixel (#F7EAE8) |
| Inactive Tab Text | Phosphor Smoke (#EFD5D1) |
| Tab Border | Dark Packet (#691B0F) |
| Modified Indicator | Stack Overglow (#D4A759) |
Sidebar
| Element | Color |
|---|---|
| Background | Null Pointer (#230905) |
| Active Item Text | Ghost Pixel (#F7EAE8) |
| Inactive Item Text | Phosphor Smoke (#EFD5D1) |
| Selected Item BG | Bad Sector (#46120A) |
| Hover State BG | Dark Packet (#691B0F) at 50% |
| Section Headers | Phantom Current (#E7C0BA) |
Status Bar
| State | Background | Text |
|---|---|---|
| Normal | Bricked Board (#7A2012) |
Ghost Pixel (#F7EAE8) |
| Error | Digital Rust (#AF2E1A) |
Ghost Pixel (#F7EAE8) |
| Warning | Amber Alert (#BF5747) |
Ghost Pixel (#F7EAE8) |
| Debug Mode | Blue Screen (#8791B0) |
Event Horizon (#110402) |
Gutter Indicators
| Indicator | Color | Shape / Style |
|---|---|---|
| Breakpoint | Amber Alert (#BF5747) fill, Event Horizon border |
Circle |
| Breakpoint (disabled) | Amber Alert (#BF5747) at 40% |
Circle outline |
| Current Execution Line | Stack Overglow (#D4A759) outline |
Arrow or ring |
| Error Marker | Amber Alert (#BF5747) |
Circle |
| Warning Marker | Stack Overglow (#D4A759) |
Diamond |
| Info Marker | Dead Thread (#6FA5A0) |
Square |
| Hint Marker | Phosphor Smoke (#EFD5D1) at 50% |
Dot |
| Git Added | Memory Leek (#8FA667) |
Vertical bar |
| Git Modified | Dead Thread (#6FA5A0) |
Vertical bar |
| Git Deleted | Amber Alert (#BF5747) |
Triangle pointing right |
Note: Gutter markers reuse the diagnostic and diff palettes for semantic consistency.
Inlay Hints & Code Lens
Inlay Hints (parameter names, inferred types)
| Element | Color | Style |
|---|---|---|
| Hint Text | Phosphor Smoke (#EFD5D1) at 50% |
italic recommended |
| Hint Background | Transparent or Bad Sector at 20% |
Subtle only |
| Hint Border/Padding | None or minimal |
Code Lens (references, test runners, action links)
| Element | Color | Notes |
|---|---|---|
| Code Lens Text | Phosphor Smoke (#EFD5D1) at 70% |
Above function/class |
| Code Lens Hover | Phantom Current (#E7C0BA) |
On mouse hover |
Note: Inlay hints and code lens must never have higher contrast than primary code tokens. They are supplementary information. They must fade into the background when not focused.
Minimap & Overview Ruler
| Element | Color | Notes |
|---|---|---|
| Minimap Background | Event Horizon (#110402) |
Match editor background |
| Minimap Code | Bad Sector (#46120A) |
Low-contrast code silhouette |
| Minimap Selection | Dark Packet (#691B0F) at 50% |
Visible but subtle |
| Minimap Search Match | Stack Overglow (#D4A759) at 40% |
Highlight find results |
| Minimap Error | Amber Alert (#BF5747) at 60% |
Error locations |
| Minimap Warning | Stack Overglow (#D4A759) at 40% |
Warning locations |
| Overview Ruler BG | Core Meltdown (#340D07) |
Scrollbar track area |
| Overview Ruler Selection | Dark Packet (#691B0F) |
Current view indicator |
Panels & Popups
Panel Backgrounds
| Panel | Background | Notes |
|---|---|---|
| Terminal | Event Horizon (#110402) |
Match editor for seamless feel |
| Problems Panel | Core Meltdown (#340D07) |
Subtle separation from editor |
| Output Panel | Copper Trace (#D7968C) |
|
| Debug Console | Copper Trace (#D7968C) |
|
| Search Panel | Copper Trace (#D7968C) |
|
| Panel Headers | Bad Sector (#46120A) |
Title bar of panels |
| Panel Header Text | Phosphor Smoke (#EFD5D1) |
Tooltips & Hover Cards
| Element | Color | Notes |
|---|---|---|
| Background | Core Meltdown (#340D07) |
|
| Text | Ghost Pixel (#F7EAE8) |
|
| Border | Dark Packet (#691B0F) |
1px solid |
| Code in Tooltip | Memory Leek (#8FA667) |
Inline code snippets |
| Link in Tooltip | Phantom Current (#E7C0BA) |
Underlined |
Autocomplete & IntelliSense
| Element | Color | Notes |
|---|---|---|
| Popup Background | Core Meltdown (#340D07) |
|
| Popup Border | Dark Packet (#691B0F) |
1px solid |
| Item Text | Ghost Pixel (#F7EAE8) |
|
| Item Text (dimmed) | Phosphor Smoke (#EFD5D1) |
Type signatures, paths |
| Selected Item BG | Bad Sector (#46120A) |
|
| Selected Item Border | Dark Packet (#691B0F) |
Optional left accent |
| Match Highlight | Stack Overglow (#D4A759) |
Matched characters in fuzzy find |
| Icon: Function | Stack Overglow (#D4A759) |
|
| Icon: Variable | Ghost Pixel (#F7EAE8) |
|
| Icon: Class/Type | Dead Thread (#6FA5A0) |
|
| Icon: Keyword | Fatal Error (#CF8175) |
|
| Icon: Constant | Bright Stack Overglow (#D3AE6E) |
|
| Icon: String | Memory Leek (#8FA667) |
Parameter Hints (signature help popups)
| Element | Color | Notes |
|---|---|---|
| Background | Core Meltdown (#340D07) |
|
| Active Parameter | Stack Overglow (#D4A759) |
Currently typed parameter |
| Inactive Parameters | Phosphor Smoke (#EFD5D1) |
|
| Separator | Copper Trace (#D7968C) |
Commas between params |
Terminal Configuration
ANSI Color Mapping
| ANSI Slot | Color Name | Hex Code |
|---|---|---|
| Black | Event Horizon | #110402 |
| Red | Rouge Signal | #C76C5E |
| Green | Memory Leek | #8FA667 |
| Yellow | Stack Overglow | #D4A759 |
| Blue | Blue Screen | #8791B0 |
| Magenta | Fractured Shell | #BA5A7D |
| Cyan | Dead Thread | #6FA5A0 |
| White | Phosphor Smoke | #EFD5D1 |
| Bright Black | Thermal Throttle | #AC6D4A |
| Bright Red | Fatal Error | #CF8175 |
| Bright Green | Bright Memory Leek | #94A577 |
| Bright Yellow | Bright Stack Overglow | #D3AE6E |
| Bright Blue | Bright Blue Screen | #999EAF |
| Bright Magenta | Bright Fractured Shell | #BA6B88 |
| Bright Cyan | Bright Dead Thread | #7FA5A1 |
| Bright White | Ghost Pixel | #F7EAE8 |
Terminal Defaults
| Element | Color |
|---|---|
| Default Foreground | Ghost Pixel (#F7EAE8) |
| Default Background | Event Horizon (#110402) |
| Cursor | Stack Overglow (#D4A759) |
| Cursor Text | Event Horizon (#110402) |
| Selection Background | Dark Packet (#691B0F) at 70% |
| Bold Text | Use Bright variant of current color |
256-Color & Truecolor Guidance
- The 16 ANSI colors above are the canonical core for 256-color terminals
- Interpolate colors 16–255 between palette colors where possible
- Truecolor-capable terminals (24-bit) use the exact hex values from the palette
- If truecolor is available, prefer it over approximated 256-color values
Safe Mode
Safe Mode is the light projection of Digital Rust. It uses the same palette, the same colour names, and the same token roles as the dark theme. Only the value that fills a role changes.
Safe Mode exists for accessibility. A reader who cannot use a dark interface can use Safe Mode and still read the system as Digital Rust.
Safe Mode In The Ports
Terminal ports carry both modes, because a terminal follows the system theme:
| Port | Dark | Safe Mode |
|---|---|---|
| Ghostty | digital-rust-ghostty |
digital-rust-ghostty-safe-mode |
| Konsole | DigitalRustKonsole.colorscheme |
DigitalRustKonsole-SafeMode.colorscheme |
| Ptyxis | the [Dark] section |
the [Light] section |
Konsole carries slots 0 to 7 with a Faint and an Intense variant, so the Intense variant is the bright half and Faint is the dim ink, which is the muted grey in both modes. Konsole's scheme format has no selection colour, so neither file declares one.
The editor ports and the KDE Plasma colour scheme are dark-only: a VS Code light theme is a second extension, and KDE's groups each choose an ink for their own fill, which the dark scheme sets now and the light one still needs.
What Changes and What Does Not Change
| Item | Dark theme | Safe Mode |
|---|---|---|
| Palette names | 19 ramp stops and six accent families | No change. Safe Mode adds no public colour name. |
| Token roles | A keyword is Fatal Error, a function is Stack Overglow | No change. The role names are the same. |
| Role values | The named hex values | New values, derived by the projection rule below |
| Surfaces | The page is the darkest stop. Elevation moves toward the light | The page is the lightest stop. Elevation moves away from the light |
| Hot panels | Toasts and status bars use Bricked Board | No change. A notice still radiates heat on a lit desk |
| Texture | Noise and scanlines | Noise stays. The scanline band is dropped, because a scanline draws the gap between two lit rows. Texture moves to the rim of the viewport |
The Projection Rule
A Safe Mode value keeps the hue of the dark-theme colour and holds a contrast ratio. The surface that the ratio is held against depends on the role, because a role can only meet the surfaces it lands on:
| Role kind | Tuning surface | Target |
|---|---|---|
| Syntax roles | Phosphor Smoke #EFD5D1, the strictest well |
The dark-theme ratio |
| Text and feedback roles | Phantom Current #E7C0BA, the darkest text-bearing panel |
4.7:1 |
| Terminal slots | Ghost Pixel #F7EAE8, the terminal background |
The dark-theme ratio, floor 4.5:1 |
| Decorative chrome | None | The step distance of the dark theme |
To derive a value, do these steps:
- Take the hue of the dark-theme colour for the role.
- Take the tuning surface for the role from the table above.
- Find the value that has the same hue and the target ratio against that surface.
- Keep the chroma near the dark-theme value. Maximum chroma leaves the warm, dusty register of the palette.
- If the role can land on a surface that the tuning surface did not cover, move the value until it clears 4.5:1 there too.
A text or feedback value sits near 4.7:1 and not at 4.5:1, so no value rests on a rounding edge. A syntax value keeps its dark-theme ratio, because a well is the only surface that a syntax role meets.
A role keeps its weight in the layout, because the ratio does not change. A loud role stays loud and a quiet role stays quiet. Only the direction flips. On a dark page a loud role is lighter than the page, and on a light page it is darker.
Safe Mode Surfaces
| Hex Code | Role | Contrast | Use |
|---|---|---|---|
| #F7EAE8 | Ghost Pixel | 17.17:1 against Event Horizon | Page background, code wells, input wells |
| #EFD5D1 | Phosphor Smoke | 1.18:1 against the page | Panels, cards, tab bodies |
| #E7C0BA | Phantom Current | 1.41:1 against the page | Raised panels, menus, modals, code block headers |
| #DFABA3 | Corrupted Cache | 1.71:1 against the page | Hover fills, selected rows, badge washes |
| #D7968C | Copper Trace | 2.07:1 against the page | Pressed fills, quiet rules |
Depth follows one rule in each mode. On dark, a raised surface is lighter than the page. On Safe Mode, a raised surface is darker than the page. The step size is the same in both modes, between 1.18:1 and 1.41:1.
The Inverted Well Rule. In Safe Mode, a well is the page colour inside a darker panel. The well is therefore the lightest surface in the panel. The 2px border and the inner lowlight do the recess work. A well never rises.
Safe Mode Syntax Role Values
The table gives the value for each token role in Safe Mode. The last column names the dark-theme colour that the value replaces.
| Hex Code | Role | Contrast | Replaces |
|---|---|---|---|
| #75322A | Keywords, storage, Markdown headings | 7.96:1 on the page | Fatal Error #CF8175 |
| #4F3D1C | Functions, method calls, shell commands | 8.87:1 on the page | Stack Overglow #D4A759 |
| #3E2C00 | Constants, booleans, null, special values | 11.43:1 on the page | Bright Stack Overglow #D3AE6E |
| #6B5122 | Built-ins, Markdown link URLs, CSS properties, pseudo-classes | 6.33:1 on the page | Dim Stack Overglow #A07E43 |
| #324513 | Strings, regex bodies, fenced code in Markdown | 8.96:1 on the page | Memory Leek #8FA667 |
| #6E320C | Numbers, units, signals | 8.42:1 on the page | Thermal Throttle #D78556 |
| #194946 | Classes, types, trait names, CSS classes and IDs | 8.59:1 on the page | Dead Thread #6FA5A0 |
| #7C523A | Comments | 5.72:1 on the page | Dim Thermal Throttle #AC6D4A |
| #624843 | Operators, markup markers | 7.08:1 on the page | Copper Trace #D7968C |
| #705A57 | Punctuation, shell prompts | 5.44:1 on the page | Copper Trace #D7968C |
| #3F4965 | Diff hunk headers, commit hashes | 7.61:1 on the page | Blue Screen #8791B0 |
| #934461 | Rainbow brackets (optional feature) | 5.52:1 on the page | Fractured Shell #BA5A7D |
| #8D362A | Errors (legacy ANSI only) | 6.64:1 on the page | Amber Alert Text #CB6353 |
A syntax role is valid on the page and on a secondary panel only. Do not render a syntax role on a raised panel. On Phantom Current, the quiet roles fall below the floor: punctuation measures 3.85:1, rainbow magenta 3.90:1, and comments 4.05:1. Markdown and code both sit in a well or on a secondary panel, so the rule holds in the current layout.
Safe Mode Text and Feedback Values
| Hex Code | Role | Contrast | Replaces |
|---|---|---|---|
| #110402 | Primary text | 17.17:1 on the page, 12.14:1 on a panel | Event Horizon #110402 |
| #46120A | Secondary text | 13.24:1 on the page, 9.36:1 on a panel | Bad Sector #46120A |
| #9D2917 | Links | 6.47:1 on the page, 4.58:1 on a panel | Phantom Current #E7C0BA |
| #8C2414 | Link hover and active | 7.52:1 on the page, 5.32:1 on a panel | Fatal Error #CF8175 |
| #7A2012 | Visited links | 8.76:1 on the page, 6.19:1 on a panel | Corrupted Cache #DFABA3 |
| #664C49 | Quiet text: shell prompts, removed diff lines, footer copy | 6.64:1 on the page, 4.69:1 on a panel | Phantom Current #E7C0BA |
| #6D605E | Muted and disabled text: the Event Horizon token at 60% over the page. A panel composites to a different value | 5.13:1 on the page, 4.52:1 on a panel | Phosphor Smoke at 50% |
| #455925 | Success | 6.60:1 on the page, 4.67:1 on a panel | Memory Leek #8FA667 |
| #6C4D06 | Warning | 6.62:1 on the page, 4.68:1 on a panel | Stack Overglow #D4A759 |
| #8D362A | Error borders, error text | 6.64:1 on the page, 4.70:1 on a panel | Amber Alert Text #CB6353 |
| #2B5A56 | Information | 6.63:1 on the page, 4.68:1 on a panel | Dead Thread #6FA5A0 |
Panel values in this table are measured against Phantom Current, the darkest text-bearing surface in Safe Mode. Each value sits near 4.7:1 and not at 4.5:1, so no value rests on a rounding edge.
In Safe Mode, an inline code chip uses Phosphor Smoke #EFD5D1 and not Corrupted
Cache. On Corrupted Cache the quiet syntax roles fall to 3.2:1.
Editor Chrome in Safe Mode
The token column gives the custom property that carries the value in both modes.
| Element | Token | Safe Mode value |
|---|---|---|
| Editor background | --dr-surface-base |
Ghost Pixel (#F7EAE8) |
| Editor foreground | --dr-text-primary |
Event Horizon (#110402) |
| Line number, rest | --dr-gutter-fg |
Phantom Current (#E7C0BA), decorative |
| Line number, active | --dr-gutter-fg-active |
Copper Trace (#D7968C) |
| Indent guide | --dr-editor-indent-guide |
Phosphor Smoke (#EFD5D1) |
| Indent guide, active | --dr-editor-indent-guide-active |
Copper Trace (#D7968C) |
| Whitespace markers | --dr-editor-whitespace |
Copper Trace at 50% |
| Current line | --dr-editor-line-highlight-bg |
Phosphor Smoke at 50% |
| Selection background | --dr-editor-selection-bg |
Phantom Current at 70% |
| Selection, window inactive | --dr-editor-selection-inactive-bg |
Phantom Current at 40% |
| Cursor | --dr-cursor |
Stack Overglow light stop (#533900) |
| Find match | --dr-editor-find-match-bg |
Corrupted Cache at 60% |
| Find match border | --dr-editor-find-match-border |
Digital Rust (#AF2E1A) |
| Find match, other hits | --dr-editor-find-match-highlight-bg |
Corrupted Cache at 35% |
| Bracket match | --dr-editor-bracket-match-bg |
Corrupted Cache (#DFABA3) |
| Unexpected bracket | --dr-editor-unexpected-bracket |
#8D362A |
A glow surrounds a focused element on dark. Emitted light reads as a smudge on a
lit page, so Safe Mode sets the glow values to none. The offset shadow and the
bevel stay.
Terminal Configuration in Safe Mode
| ANSI Slot | Color Name | Hex Code |
|---|---|---|
| Black | Event Horizon | #110402 |
| Red | Safe 〃 | #BF3C26 |
| Green | Safe 〃 | #3B5218 |
| Yellow | Safe | #533900 |
| Blue | Safe 〃 | #495370 |
| Magenta | Safe 〃 | #A84A6D |
| Cyan | Safe 〃 | #1E5451 |
| White | Phosphor Smoke | #EFD5D1 |
| Bright Black | Safe 〃 (the dim ink) | #6D605E |
| Bright Red | Safe 〃 | #63231D |
| Bright Green | Safe 〃 | #3F4F27 |
| Bright Yellow | Safe 〃 | #4C3600 |
| Bright Blue | Safe | #434857 |
| Bright Magenta | Safe | #934865 |
| Bright Cyan | Safe 〃 | #2C504D |
| Bright White | Ghost Pixel | #F7EAE8 |
A slot that carries the paper colour of its mode is a fill rather than ink: slot 0 is the page in the dark theme, and slots 7 and 15 are the page in Safe Mode. Those slots are excluded from the text floor, in both the specification and the check. Every other slot is text and clears 4.5:1 in both modes.
Slot 8 is the dim ink in every terminal. A dimmer version of a colour cannot clear
4.5:1 against the surface it sits on, in either mode, so dim is carried by a
desaturated tone instead: Thermal Throttle #AC6D4A on dark, and the muted ink
#6D605E in Safe Mode.
The red slot clears the text floor in both modes: 4.60:1 in Safe Mode and 5.50:1 on the dark page. Digital Rust measures 3.10:1 on the dark page, and 3.32:1 is its ceiling against any colour, so the namesake colour can never carry terminal text on a dark surface. It keeps the accent role, where it is a fill and not text.
Slot 0 and slot 7 change meaning in Safe Mode. Slot 0 carries the text and slot 7 carries the background. This is the convention for light terminal themes. A program that assumes a dark background can render low-contrast text. Test a Safe Mode terminal with real tools before you release it.
Terminal Defaults in Safe Mode
| Element | Color |
|---|---|
| Default foreground | Event Horizon (#110402) |
| Default background | Ghost Pixel (#F7EAE8) |
| Cursor | #533900 |
| Cursor text | Ghost Pixel (#F7EAE8) |
| Selection background | Phantom Current (#E7C0BA) at 70% |
| Bold text | Use the Bright slot of the current color |
How to Select a Mode
A conforming implementation selects the mode in this order:
- Read the mode that the user saved.
- If the user saved no mode, read
prefers-color-scheme. Related platform indicators of a light or dark preference are also permitted. - If the platform gives no preference, use the dark theme.
- Make sure that a manual switch is available. Some readers need a fixed mode.
Resolve the mode before the first paint, so the page never flashes the wrong
theme. Set the color-scheme property to dark or light to match, and set the
background of the root element. Without that step the browser shows a pure white
canvas during a load or an overscroll. The White Is Forbidden Rule bans that
value.
Implementation Guidelines
Accessibility Standards
Minimum Contrast Requirements
Maintain 4.5:1 minimum contrast ratio (WCAG 2.1 Level AA) for all text. These canonical pairs are verified:
| Foreground | Background | Contrast Ratio | Status |
|---|---|---|---|
| Ghost Pixel (#F7EAE8) | Event Horizon (#110402) | ~17.17:1 | ✓ Pass |
| Dim Thermal Throttle (#AC6D4A) | Event Horizon (#110402) | ~4.84:1 | ✓ Pass |
| Amber Alert (#BF5747) | Event Horizon (#110402) | ~4.5:1 | ⚠ Borderline — use --amber-alert-text (#CB6353, ~5.23:1) for guaranteed AA |
| Phosphor Smoke (#EFD5D1) | Core Meltdown (#340D07) | ~12.5:1 | ✓ Pass |
| Ghost Pixel (#F7EAE8) | Bricked Board (#7A2012) | ~8.76:1 | ✓ Pass |
| Bad Sector (#46120A) | Core Meltdown (#340D07) | ~1.12:1 | ⚠ Decorative only |
Note: Low-contrast pairs like disabled text on backgrounds are permitted only for decorative or non-essential elements. Critical information must always meet 4.5:1.
Text on Hot Panels
A hot panel keeps a dark fill in both modes. A toast or a status bar uses Bricked Board, so the pastel accents need a lighter value. These values apply to the dark theme and to Safe Mode.
| Foreground | Background | Contrast Ratio | Status |
|---|---|---|---|
#9AB867 (success text) |
Bricked Board (#7A2012) | 4.61:1 | ✓ Pass |
#D9A540 (warning text) |
Bricked Board (#7A2012) | 4.60:1 | ✓ Pass |
#FF8E7B (error text) |
Bricked Board (#7A2012) | 4.60:1 | ✓ Pass |
#73BAB4 (information text) |
Bricked Board (#7A2012) | 4.61:1 | ✓ Pass |
| Ghost Pixel (#F7EAE8) | Bricked Board (#7A2012) | 8.76:1 | ✓ Pass |
A 3px accent strip on a toast is decoration. It keeps the family base value, such
as Memory Leek #8FA667, in both modes. Only text must clear the floor.
Safe Mode Contrast
Panel values are measured against Phantom Current, the darkest text-bearing surface in Safe Mode.
| Foreground | Background | Contrast Ratio | Status |
|---|---|---|---|
| Event Horizon (#110402) | Ghost Pixel (#F7EAE8) | ~17.17:1 | ✓ Pass |
| Event Horizon (#110402) | Phantom Current (#E7C0BA) | ~12.14:1 | ✓ Pass |
| Bad Sector (#46120A) | Phantom Current (#E7C0BA) | ~9.36:1 | ✓ Pass |
| Kernel Panic (#9D2917) | Phantom Current (#E7C0BA) | ~4.58:1 | ✓ Pass |
#455925 (success) |
Phantom Current (#E7C0BA) | ~4.67:1 | ✓ Pass |
#2B5A56 (information) |
Phantom Current (#E7C0BA) | ~4.68:1 | ✓ Pass |
#324513 (strings) |
Phosphor Smoke (#EFD5D1) | ~7.57:1 | ✓ Pass |
#705A57 (punctuation) |
Phosphor Smoke (#EFD5D1) | ~4.59:1 | ✓ Pass — the lowest syntax value |
| Digital Rust (#AF2E1A) | Phantom Current (#E7C0BA) | ~3.92:1 | ✓ Pass — focus ring, 3:1 floor |
| Copper Trace (#D7968C) | Phantom Current (#E7C0BA) | ~1.47:1 | Deviation. See the note below. |
Non-text Contrast
WCAG 2.1 Success Criterion 1.4.11 asks for 3:1 on the visual information that identifies a user interface component or its state.
The criterion applies to a control: a button, an input, a checkbox, a toggle, a slider, a tab, a scrollbar thumb, or a focus ring. A control identifies itself by its wall. The criterion does not apply to a container: a card, a panel, a code block, or a toast. A container carries no state a reader must detect, and its content identifies it.
That split gives the system one wall for a control and another for a container:
| Wall | Dark theme | Safe Mode |
|---|---|---|
| A control | Rouge Signal #C76C5E, 4.75:1 against a panel |
Dark Packet #691B0F, 10.14:1 against the page |
| A control on hover | Firewall Breach #B74230, 3.18:1 |
Digital Rust #AF2E1A, 3.92:1 |
| An invalid control | Amber Alert #BF5747, 3.87:1 |
#8D362A, 4.48:1 |
| A container | Dark Packet #691B0F, 1.69:1 against the page |
Dark Packet #691B0F, 10.14:1 |
| A focus ring | Stack Overglow #D4A759, 5.84:1 or better |
Digital Rust #AF2E1A, 3.92:1 or better |
| A scrollbar thumb | Rouge Signal #C76C5E, 5.50:1 |
#9D2917, 6.47:1 |
Why the dark control wall moved. The first ramp stop that clears 3:1 against a dark panel is Firewall Breach, at 3.18:1. The six stops below it, from Bad Sector to Kernel Panic, span 2.04:1 end to end, so no two of them can form a 3:1 pair. A compliant control wall in the dark theme is a warm mid-tone by necessity.
Recorded deviations. A container wall sits below 3:1 in both modes: 1.69:1 on
the dark page and 2.07:1 on the Safe Mode page. That is the whole of the list.
Every control wall, state, focus ring, scrollbar thumb, text role, syntax role and
terminal slot clears its floor in both modes. pnpm contrast checks the declared
pairs and prints this list on every run.
Non-Color Cues
Errors, warnings, and critical states must not rely on color alone. Use these secondary cues:
- Errors: Red color + wavy underline + error icon (⚠ or ✗)
- Warnings: Yellow color + wavy underline + warning icon
- Info/Hints: Blue color + dotted underline or icon
- Success: Green color + checkmark icon
- Links: Color + solid underline (hover reveals additional state)
- Spelling Errors: Dotted underline (distinct style from error underlines)
Color Vision Deficiency Considerations
- Test with protanopia, deuteranopia, and tritanopia simulations
- Give red/green distinctions (diff views, success/error) non-color differentiators
- Use Safe Mode as the documented alternative for a reader who needs a light interface
Consistency Requirements
- Priority Order: Follow the token classification hierarchy strictly
- Fallback Handling: Use
Ghost Pixelfor unrecognized tokens - Semantic Consistency: Same meaning = same color across all languages
- Warmth Balance: Maintain the warm rust-copper tone throughout
UI Design Guidelines
User-interface theming is specified separately in the Digital Rust UI Specification: surfaces, elevation, interaction physics, and component-level definitions for buttons, inputs, menus, modals, and the rest. This document owns the palette, syntax token classification, editor chrome, and terminal configuration. The UI Specification owns everything a full application theme needs beyond the editor. Both documents reference colours by the same stable names defined in the Color Palette above.
The summaries below cover the colour-usage rules that ports of this syntax theme need most often when they extend Digital Rust beyond the editor.
Visual Hierarchy
Apply colors by functional importance and user interaction patterns:
- High Priority: Interactive elements, CTAs, error states →
Digital Rust (#AF2E1A),Amber Alert (#BF5747) - Medium Priority: Headers, navigation, secondary actions →
Fatal Error (#CF8175),Stack Overglow (#D4A759) - Low Priority: Body text, supporting information →
Ghost Pixel (#F7EAE8),Phosphor Smoke (#EFD5D1)
Component Colour Guidelines
Borders and Separators
- A control wall:
--dr-border-color, Rouge Signal on dark and Dark Packet in Safe Mode, at 2px - A container wall:
--dr-border-color-container, Dark Packet in both modes, at 2px - Page and site chrome: the container wall at 4px
- Subtle Dividers:
--dr-border-subtleat 1px - Focus Rings:
--dr-focus-color, Stack Overglow on dark and Digital Rust in Safe Mode, at 2px - Container Edges:
Core Meltdown (#340D07)for nested depth
Shadows and Depth
- NEVER use pure black (#000) shadows — they are cold and dead; always use warm shadow tones
- Use the shadow colour, Bad Sector (
#46120A) /--dr-shadow-color, for offset shadows in both modes - Use
Event Horizon (#110402)only for legacy blunt shadows that need maximum depth - No gradients, no blur, no transparency — solid colors only, apart from the texture overlay and the slider fill. Safe Mode moves the texture to a rust scorch at the rim
- Interactive and elevated elements add the inner highlight under the offset shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.1)on dark and0.5white in Safe Mode
State Indicators
- Success:
Memory Leek (#8FA667) - Warning:
Stack Overglow (#D4A759) - Error:
Amber Alert (#BF5747)orDigital Rust (#AF2E1A)for critical - Info:
Dead Thread (#6FA5A0) - Processing:
Stack Overglow (#D4A759)with animation
Link Styling
- Default:
Phantom Current (#E7C0BA)as specified in palette - Hover:
Fatal Error (#CF8175)with optional underline - Visited:
Corrupted Cache (#DFABA3) - Active:
Digital Rust (#AF2E1A)
Theme Philosophy
Digital Rust embraces the aesthetic of system degradation and hardware failure while maintaining professional usability. The theme should evoke:
- Warmth: Through rust and copper tones rather than cold blues
- Nostalgia: Terminal aesthetics meet modern requirements
- Clarity: Despite the “corrupted” naming, readability is paramount
- Character: Each color name tells a story of digital decay
- Semantic Consistency: Identical semantic roles are rendered consistently across languages, even when their surface syntax differs
- Tactility: Interactive elements behave like chunky old hardware — pressable, beveled, and physically responsive (defined in the UI Specification)
Testing Requirements
Required Testing Scenarios
- Language Coverage: Test with at least 5 different programming languages
- File Types: Verify Markdown, JSON, XML, and configuration files
- Diff Views: Make sure that additions and deletions are clearly distinguishable
- Terminal Emulation: Validate the ANSI color representation
- Light Sensitivity: Provide documentation for users sensitive to warm tones
Performance Considerations
- Colors must render consistently across sRGB and P3 color spaces
- Test on both high-contrast and standard displays
- Verify legibility at zoom levels from 50% to 200%
Implementation Notes
Canonical Source
This specification is the canonical source of truth for Digital Rust. All editor-specific theme implementations (VS Code, JetBrains, Neovim, Sublime Text, terminals, web applications, and others) are projections of this specification.
If a conflict arises between an implementation and this spec, this document takes precedence. Document any intentional deviations in the implementation.
Handling Coarse Tokenization
Some editors or language grammars provide limited token granularity. If fine-grained semantic distinctions are not possible:
-
Built-ins vs. User Definitions: If built-in functions cannot be distinguished from user-defined functions, use
Stack Overglow (#D4A759)for all functions. -
Types vs. Variables: If types cannot be distinguished from variables, prefer
Ghost Pixel (#F7EAE8)as the neutral fallback. -
Ambiguous Tokens: Favor readability and contrast over a semantic color that does not map cleanly.
-
Missing Scopes: For tokens not covered by the grammar, fall back to
Ghost Pixel (#F7EAE8).
Guiding Principle: If in doubt, prioritize readability and visual comfort over strict semantic accuracy.
Version History
- v1.3.1: Safe Mode reaches the agent skill, and the machined tracks and quiet text are fixed
- The agent skill now covers Safe Mode end to end: the token table carries a dark and a Safe Mode value for every role, a new reference holds the projection rule and the mode tables, and the component, editor, and syntax references name their Safe Mode values. The skill adds no colour
- A machined track keeps a dark fill in both modes.
--dr-machined-trackis Bad Sector and--dr-machined-railis Event Horizon, both invariant. The old tracks read--dr-surface-highlight, which becomes Corrupted Cache in Safe Mode, where a Ghost Pixel thumb measured 1.71:1 on the toggle and 1.00:1 on the slider's unused portion --dr-text-quiettakes Phantom Current on dark, as the UI specification's token table always said. The token layer had used Copper Trace- The UI Specification's component sections now name the control wall and the container wall, so the prose agrees with its token table and the reference implementation. The Safe Mode well takes the control wall, and the scrollbar, table, surface, and colour-usage sections name the current tokens
- v1.3.0: Safe Mode implemented on the site, and the dark theme brought to the floor
- The dark control wall moves from Dark Packet to Rouge Signal. A control identifies itself by its wall, so the wall clears 3:1. The first ramp stop that can is Firewall Breach, at 3.18:1 against a panel
- A container keeps a recessed wall:
--dr-border-color-containeris Dark Packet in both modes, because content identifies a container and the criterion does not apply to it - Well borders, disabled text, the scrollbar thumb and the ANSI red slot all move above their floors
- The dark red slot becomes Rouge Signal. Digital Rust measures 3.10:1 on the dark page and 3.32:1 is its ceiling against any colour, so it can never carry terminal text on a dark surface. It keeps the accent role, where it is a fill and not text
- Safe Mode is defined for the syntax roles, the surfaces, the editor chrome, and the terminal, and it is implemented on the site
- Safe Mode adds no public colour name. Each role keeps its name and takes a new value, derived by the projection rule
- The role layer is one table with a dark and a Safe Mode column. It emits the dark block, the
[data-scheme='safe-mode']block, and theprefers-color-scheme: lightblock - Mode selection is specified and implemented: a saved preference first, then
prefers-color-scheme, then the dark theme, resolved before the first paint. A manual switch is required and present - The Inverted Well Rule is added: in Safe Mode a well is the lightest surface in its panel
- The scanline band is dropped in Safe Mode. Texture moves to the rim of the viewport
- Hot panels keep their dark fills in both modes
- The Shiki themes for both modes are built from the same role table, so the syntax colours cannot drift
pnpm contrastchecks the declared colour pairs in both modes. Safe Mode passes every pair; the dark theme has recorded deviations, listed in the accessibility section- The block cursor takes the terminal background as its text colour: Ghost Pixel on Stack Overglow measured 1.89:1 and failed AA
- v1.2.3: Contrast fix on hot panels
- Toast and status bar text on Bricked Board failed WCAG AA: Memory Leek measured 3.83:1, Dead Thread 3.70:1, and Amber Alert Text 2.67:1
- Hot panels now use four on-hot text values:
#9AB867,#D9A540,#FF8E7B, and#73BAB4. Each clears 4.60:1 - Toast accent strips keep the family base values, because a strip is decoration
- v1.2.2: Technical prose rewritten in Simplified Technical English
- Rules, notes, guidelines, and implementation text rewritten for short sentences, condition-first instructions, and consistent verbs
- No palette, token, or hex value changes
- Brand-voice passages (overview, theme philosophy, design principles) unchanged
- v1.2.1: UI specification accessibility and token fixes
- Primary button hover fill changed to Firewall Breach: Ghost Pixel on raw Amber Alert failed WCAG AA (3.83:1); Firewall Breach passes at 4.66:1
- Semantic action/feedback/border-colour token layer added to
tokens.css(--dr-accent,--dr-accent-hover,--dr-success,--dr-warning,--dr-danger,--dr-danger-text,--dr-info,--dr-border-color*); component code now references semantic tokens, not raw palette values - Ambient texture (scanline/noise overlay) implementation documented; overlays now suppress under
prefers-reduced-motion - Loading/skeleton state specified; unused decorative tokens removed
- v1.2.0: UI specification added
- New sibling document: the Digital Rust UI Specification, covering surfaces, elevation, interaction physics, and component definitions
- This document retains the palette, syntax tokens, editor chrome, terminal configuration, and colour-usage summaries
- Component colour guidance updated to include the inner-highlight bevel rule
- v1.1.1: Showcase and spec alignment fixes
- Fixed
thistoken color: keyword → constant (Bright Stack Overglow) - Fixed
ErrorKind::Otherenum variant: variable → constant (Bright Stack Overglow) - Fixed HTML tag names in code sample: selector → Dead Thread
- Fixed diff modification line text color to Ghost Pixel (spec default)
- Clarified Amber Alert text rendering: spec token uses #BF5747 but text rendering on dark backgrounds uses WCAG-AA
--amber-alert-text(#CB6353) - Aligned copyright year across all spec documents
- Fixed
- v1.1.0: Spec corrections and normalizations
- Corrected contrast ratios to measured WCAG 2.1 values
- Spelling errors changed to dotted underline for distinguishability from error wavy underlines
- Primary borders clarified as 2–4px per design system
- Shadow guidance: use Bad Sector / --dr-surface-highlight, not Event Horizon
- Gradients/blur/transparency explicitly prohibited (noise/scanline overlays excepted)
- v1.0.0: Initial specification release
- Theme inspired by system failures, kernel panics, and the beauty of digital entropy
- Color names honor the poetry of corrupted systems
Digital Rust © 2025–2026 by Kat Suricata is dual-licensed under CC BY 4.0 or Apache-2.0.
Chaos reigns.