Digital Rust Syntax Highlighting Specification

Official syntax highlighting and design specification for the Digital Rust theme.

Status Living Specification
Last Updated --
Format HTML · Markdown

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.

Live Snippet Spec OK
// 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)
}
Keywords & control
Functions
Types
Strings
Signals & numbers

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

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
#a36541 DimOrange Dim 〃
#d6926b BrightOrange Bright 〃

Syntax Highlighting Rules

Token Classification

Following TextMate scoping conventions for consistent highlighting across editors.

Primary Tokens

Keywords & StorageFatal 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 & MethodsStack Overglow (#D4a759)

  • Function Declarations and Calls
  • Method Invocations
  • User-defined Functions

Classes & TypesDead Thread (#6fa5a0)

  • Class Names and Constructors
  • Type Annotations: int, string, boolean
  • Interfaces and Enums
  • Generic Type Parameters

Strings & TextMemory Leek (#8fa667)

  • String Literals: "corrupted", 'failed', `template`
  • Escape Sequences (e.g., \n, \t)

NumbersThermal Throttle (#d78556)

  • Numeric Literals: 42, 3.14, 0xFF, 1e5

Constants & Special ValuesBright 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 to emphasize their semantic role as special language constants rather than numeric data.

CommentsDim Thermal Throttle (#a36541) italic

  • Single-Line: //, #, --
  • Multi-Line: /* */, <!-- -->
  • Documentation Blocks (JSDoc, Javadoc, docstrings, etc.)

Attributes & DecoratorsDead 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 and is styled as part of the attribute token.

Support & Built-ins

Built-ins & Standard LibraryDim 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 AttributesDim Stack Overglow (#a07e43)

  • Attribute Names: class, id, href, src
  • TextMate scope: entity.other.attribute-name

Markup Attribute ValuesMemory Leek (#8fa667)

  • Quoted Values: "container", 'primary'
  • TextMate scope: string.quoted within markup

Regular Expressions

  • Regex Literals & Character Classes → Memory Leek (#8fa667)
  • Regex Operators & Metacharacters (+, *, ?, |, ^, $) → Copper Trace (#d7968c)
  • Regex Groups & Brackets → Copper Trace (#d7968c)

Variables & IdentifiersGhost Pixel (#f7eae8)

  • Variable Names and Parameters
  • Object Properties
  • Default Text Content
  • TextMate scope: variable, variable.parameter

Errors & WarningsAmber Alert (#bf5747)

  • Syntax Errors
  • Deprecated Code (with strikethrough where supported)
  • Invalid Tokens

Operators & Punctuation

OperatorsCopper Trace (#d7968c)

  • Arithmetic: +, -, *, /, %, **
  • Comparison: ==, !=, <, >, <=, >=, ===, !==
  • Logical: &&, ||, !, and, or, not
  • Assignment: =, +=, -=, *=, /=
  • Bitwise: &, |, ^, ~, <<, >>

Punctuation & DelimitersCopper 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: Wavy underline using Amber Alert (#bf5747)
  • Potential errors/warnings: Wavy underline using Stack Overglow (#D4a759)

Accessibility Note: Links and spelling errors must be distinguishable by underline style (solid vs. wavy), not just color.

Strikethrough

  • Deprecated code or APIs
  • Completed tasks in TODO comments

Special Rules

Scope Prioritization

When multiple scopes apply to a token, apply styles in this precedence order:

  1. Error scopes (highest priority) — Always override other styles
  2. Warning scopes — Override non-error styles
  3. Language-specific overrides — Per-language customizations
  4. Semantic token colors — LSP/semantic highlighting
  5. Base syntax colors (lowest priority) — TextMate grammar defaults

Rule: If a token is both an error and another role (e.g., a misspelled keyword), the error style takes full precedence. The token should display 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, cycling 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:

KeysDead 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 ElementsCopper Trace (#d7968c)

  • Colons, commas, brackets
  • YAML dashes for list items

Design Note: Keys and values are intentionally colored differently to make 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) on Bad Sector (#46120a) background
  • Fenced code blocks → Normal syntax highlighting inside
  • Code fence markers (```) → Copper Trace (#d7968c)

BlockquotesPhosphor 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 RulesDark 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 (#a36541) italic

Angle Brackets & DelimitersCopper Trace (#d7968c)

  • <, >, </, />

Template Languages (JSX, Vue, Handlebars, EJS, etc.)

  • 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, @keyframesFatal Error (#cf8175)

Utility-First (Tailwind, etc.)

  • Class Names in HTML → Dead Thread (#6fa5a0) (treat as structural labels)

String Interpolation

String ContainersMemory 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 DelimitersCopper Trace (#d7968c)

  • ${, }, #{, {, }

Implementation Note: Interpolated segments should be tokenized as full expressions, not rendered 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 & ExecutablesStack Overglow (#D4a759)

  • First word on a line (command name)
  • Built-in commands: echo, cd, export
  • External commands: grep, awk, curl

Flags & OptionsFatal Error (#cf8175)

  • Short flags: -a, -v, -rf
  • Long flags: --help, --verbose, --output

VariablesGhost Pixel (#f7eae8)

  • Environment variables: $PATH, $HOME, ${VAR}
  • Positional parameters: $1, $@, $#
  • Sigil ($) inherits variable color per sigil rules

Here-DocumentsMemory Leek (#8fa667)

  • Here-doc body content follows string rules
  • Delimiter tokens (<<EOF, EOF) → Copper Trace (#d7968c)

Shebang LineDim Thermal Throttle (#a36541) italic

  • #!/bin/bash, #!/usr/bin/env python
  • Treat as a special comment

SQL

KeywordsFatal 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

FunctionsStack Overglow (#D4a759)

  • Aggregate: COUNT, SUM, AVG, MIN, MAX
  • Scalar: COALESCE, NULLIF, CAST, CONVERT
  • Date/Time: NOW, DATEADD, DATEDIFF

TypesDead Thread (#6fa5a0)

  • VARCHAR, INT, BIGINT, BOOLEAN, TIMESTAMP, TEXT, DECIMAL

IdentifiersGhost 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 KeywordsFatal Error (#cf8175)

  • #include, #define, #undef
  • #if, #ifdef, #ifndef, #else, #elif, #endif
  • #pragma, #error, #warning

Macro NamesBright Stack Overglow (#d3ae6e)

  • Defined constants: MAX_SIZE, DEBUG_MODE
  • Treat as named constants

Macro ParametersGhost Pixel (#f7eae8)

  • Parameters in macro definitions follow variable.parameter rules

Include PathsMemory 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

LifetimesDead Thread (#6fa5a0) italic

  • 'a, 'static, '_
  • The tick (') is part of# the lifetime token

TraitsDead Thread (#6fa5a0)

  • Trait names: Clone, Debug, Iterator, Send, Sync
  • Trait bounds follow type coloring

MacrosStack Overglow (#D4a759)

  • Macro invocations: println!, vec!, format!
  • The ! is part of the macro name

Note: Rust attributes (#[derive], #[cfg]) are already covered under Attributes & Decorators.

Haskell / ML / Functional Languages

Type ConstructorsDead Thread (#6fa5a0)

  • Maybe, Either, List, IO
  • Type-level names starting with uppercase

Data ConstructorsBright 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 VariablesDead Thread (#6fa5a0) italic

  • Lowercase type parameters: a, b, m
  • Distinguish from term-level variables via 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 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 should still meet minimum contrast where practical. When full contrast cannot be achieved, use additional visual cues (e.g., reduced opacity, 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)
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, etc.)

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 and should 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
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 Digital Rust #af2e1a
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 Bad Sector #46120a
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
  • Colors 16–255 should interpolate between palette colors where possible
  • Truecolor-capable terminals (24-bit) should use exact hex values from the palette
  • When truecolor is available, prefer it over approximated 256-color values

Implementation Guidelines

Accessibility Standards

Minimum Contrast Requirements

Maintain 4.5:1 minimum contrast ratio (WCAG 2.1 Level AA) for all text. The following canonical pairs have been verified:

Foreground Background Contrast Ratio Status
Ghost Pixel (#f7eae8) Event Horizon (#110402) ~15.5:1 ✓ Pass
Dim Thermal Throttle (#a36541) Event Horizon (#110402) ~5.2:1 ✓ Pass
Amber Alert (#bf5747) Event Horizon (#110402) ~5.8:1 ✓ Pass
Phosphor Smoke (#efd5d1) Core Meltdown (#340d07) ~8.9:1 ✓ Pass
Ghost Pixel (#f7eae8) Bricked Board (#7a2012) ~6.7:1 ✓ Pass
Bad Sector (#46120a) Core Meltdown (#340d07) ~1.8:1 ⚠ Decorative only

Note: Low-contrast pairs like disabled text on backgrounds are acceptable only for decorative or non-essential elements. Critical information must always meet 4.5:1.

Non-Color Cues

Errors, warnings, and critical states must not rely on color alone. Specify 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: Wavy underline (distinct style from error underlines)

Color Vision Deficiency Considerations

  • Test with protanopia, deuteranopia, and tritanopia simulations
  • Ensure red/green distinctions (diff views, success/error) have non-color differentiators
  • Consider providing alternative high-contrast mode documentation

Consistency Requirements

  1. Priority Order: Follow token classification hierarchy strictly
  2. Fallback Handling: Use Ghost Pixel for unrecognized tokens
  3. Semantic Consistency: Same meaning = same color across all languages
  4. Warmth Balance: Maintain the warm rust-copper tone throughout

UI Design Guidelines

Visual Hierarchy

Apply colors based on 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 Guidelines

Borders and Separators

  • Primary Borders: Dark Packet (#691B0f) at 1-2px width
  • Subtle Dividers: Bad Sector (#46120a) at 1px width
  • Focus Rings: Stack Overglow (#D4a759) at 2px width
  • Container Edges: Core Meltdown (#340d07) for nested depth

Shadows and Depth

  • Avoid pure black shadows to maintain warmth
  • Use Event Horizon (#110402) at 20-40% opacity for shadows
  • Elevation and gradients are not against spec, but should be used sparingly if they are used at all

State Indicators

  • Success: Memory Leek (#8fa667)
  • Warning: Stack Overglow (#D4a759)
  • Error: Amber Alert (#bf5747) or Digital 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

Testing Requirements

Required Testing Scenarios

  1. Language Coverage: Test with at least 5 different programming languages
  2. File Types: Verify Markdown, JSON, XML, and configuration files
  3. Diff Views: Ensure additions/deletions are clearly distinguishable
  4. Terminal Emulation: Validate ANSI color representation
  5. Light Sensitivity: Provide documentation for users sensitive to warm tones

Performance Considerations

  • Colors should render consistently across sRGB and P3 color spaces
  • Test on both high-contrast and standard displays
  • Verify legibility at various zoom levels (50% - 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, etc.) are projections of this specification.

When conflicts arise between an implementation and this spec, this document takes precedence. Implementers should document any intentional deviations.

Handling Coarse Tokenization

Some editors or language grammars provide limited token granularity. When fine-grained semantic distinctions cannot be made:

  1. Built-ins vs. User Definitions: When built-in functions cannot be distinguished from user-defined functions, use Stack Overglow (#D4a759) for all functions.

  2. Types vs. Variables: When types cannot be distinguished from variables, prefer Ghost Pixel (#f7eae8) as the neutral fallback.

  3. Ambiguous Tokens: Favor readability and contrast over forcing a semantic color that doesn’t map cleanly.

  4. Missing Scopes: For tokens not covered by the grammar, fall back to Ghost Pixel (#f7eae8).

Guiding Principle: When in doubt, prioritize readability and visual comfort over strict semantic accuracy.


Version History

  • 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 by Kat Suricata is licensed under CC BY-SA 4.0.

Chaos reigns.