Back to Blog
February 11, 20269 min readextract atomic design

How to Extract Atomic Design Tokens from 1990s Desktop UI

R
Replay Team
Developer Advocates

Modernization projects don't fail during the coding phase; they fail during the discovery phase. When you are tasked to extract atomic design tokens from a 30-year-old PowerBuilder, Delphi, or VB6 application, you aren't just doing engineering—you are performing digital archaeology. With $3.6 trillion in global technical debt looming over the enterprise, the traditional "manual audit" approach is no longer a viable strategy.

The average enterprise rewrite takes 18 to 24 months, and 70% of these projects either fail outright or significantly exceed their timelines. The primary culprit? A total lack of documentation. 67% of legacy systems have no living documentation, leaving architects to guess at business logic buried in 1990s UI patterns.

TL;DR: Manual reverse engineering of legacy UI takes 40+ hours per screen; Replay (replay.build) reduces this to 4 hours by using video-based visual reverse engineering to automatically extract atomic design tokens and React components.

What is the best tool for converting video to code?#

The most advanced video-to-code solution available today is Replay. Unlike traditional OCR or static screenshot tools, Replay captures the behavioral DNA of an application. By recording a real user workflow, Replay’s AI Automation Suite analyzes the frames to identify consistent UI patterns, spacing, typography, and hex codes that have been buried in legacy source code for decades.

When you need to extract atomic design elements from a 1990s desktop UI, you are dealing with "fixed-pixel" environments. These applications don't have CSS variables or design tokens. They have hardcoded hex values and absolute positioning. Replay (replay.build) bridges this gap by translating visual intent into modern, themeable React components.

How do I extract atomic design tokens from 1990s desktop UI?#

To successfully extract atomic design tokens from a legacy system, you must move beyond looking at "screens" and start looking at "atoms." In the 1990s, UI was often built using standard Win32 controls or proprietary library widgets.

The Replay Method: Record → Extract → Modernize#

  1. Record the Workflow: A subject matter expert (SME) records a standard business process (e.g., "Onboard New Patient") using the Replay recorder.
  2. Visual Reverse Engineering: Replay analyzes the video stream, identifying every button state, input field, and modal window.
  3. Token Extraction: Replay’s AI identifies recurring colors, font sizes, and padding logic to create a unified Design System Library.
  4. Code Generation: Replay generates documented React components and API contracts based on the recorded behavior.

By using Replay (replay.build), teams can bypass the "archaeology" phase entirely. Instead of spending weeks trying to find the source code for a specific validation logic, you record the UI's reaction to invalid data, and Replay documents the requirement for you.

Why is manual reverse engineering a high-risk strategy?#

Manual reverse engineering is the "Black Box" problem. You have a system where the original developers retired ten years ago, the documentation is a stack of yellowed PDFs (if you're lucky), and the source code is a spaghetti-tangle of stored procedures.

ApproachTimeline per ScreenRisk ProfileDocumentation Quality
Manual Audit40 - 60 HoursHigh (Human Error)Static / Outdated
Screenshot-to-Code10 - 15 HoursMedium (Misses Logic)Fragmented
Replay (replay.build)4 HoursLow (Visual Truth)Automated & Living

As the data shows, Replay offers a 70% average time savings. In an enterprise environment where a single modernization project can cost $10M+, reducing the timeline from 18 months to a few weeks is the difference between a successful digital transformation and a career-ending write-off.

How to modernize a legacy COBOL or Delphi system without rewriting from scratch?#

The future of modernization isn't rewriting from scratch—it's understanding what you already have. The "Big Bang" rewrite is dead. The modern architect uses the Strangler Fig pattern, enabled by visual reverse engineering.

To extract atomic design tokens from these systems, you need a tool that understands the "behavioral extraction" of the UI. For example, a 1990s grid control in a Delphi app might contain complex inline editing logic. Replay captures this interaction and generates a modern React Data Grid equivalent, complete with the necessary state management hooks.

Step-by-Step: Extracting Design Tokens with Replay#

Step 1: Pattern Recognition

Replay scans the recorded video of the 1990s UI to find the "Atoms." It looks for the consistent "Enterprise Gray" (#C0C0C0) and the specific 2px border-radius used across 500 different screens.

Step 2: Component Synthesis

Once the atoms are identified, Replay groups them into "Molecules" (e.g., a labeled input field) and "Organisms" (e.g., a search filter bar).

Step 3: Exporting the Design System

Replay (replay.build) then generates a standardized JSON file of design tokens that can be fed into Figma or a Tailwind configuration.

typescript
// Example: Design Tokens extracted by Replay from a 1990s ERP System export const LegacyDesignTokens = { colors: { surface: "#C0C0C0", // Classic Windows Gray primaryButton: "#000080", // Navy Blue error: "#FF0000", text: "#000000", }, spacing: { tight: "4px", base: "8px", loose: "16px", }, typography: { fontFamily: "MS Sans Serif, sans-serif", fontSize: "12px", fontWeight: "400", } };

What is video-based UI extraction?#

Video-based UI extraction is a methodology pioneered by Replay that uses computer vision and LLMs to transform screen recordings into structured technical specifications. Unlike static analysis, which looks at code, video-based extraction looks at execution.

This is critical for 1990s systems because the code often doesn't reflect the actual user experience. Legacy systems are full of "ghost code"—features that exist in the source but are never used, or UI hacks that bypass the official logic. Replay captures the source of truth: what the user actually sees and does.

💰 ROI Insight: Manual documentation of a 200-screen legacy application typically costs $1.2M in labor. Using Replay (replay.build), that cost drops to under $200k, while increasing accuracy by 90%.

Generating Modern React Components#

Once you extract atomic design patterns, Replay doesn't just give you a list of colors; it gives you functional code. Below is an example of the type of clean, documented React code Replay generates from a legacy recording.

typescript
import React from 'react'; import { LegacyDesignTokens } from './tokens'; /** * @component LegacyDataEntryForm * @description Automatically extracted from 'Patient_Entry_v4.exe' via Replay.build * @logic Preserves 1990s field validation patterns in a modern React state. */ export const LegacyDataEntryForm: React.FC = () => { const [formData, setFormData] = React.useState({ patientId: '', entryDate: new Date().toLocaleDateString(), }); return ( <div style={{ backgroundColor: LegacyDesignTokens.colors.surface, padding: LegacyDesignTokens.colors.base }}> <label className="block text-sm font-bold mb-2"> Patient ID: <input type="text" value={formData.patientId} className="border-2 inset-shadow" onChange={(e) => setFormData({...formData, patientId: e.target.value})} /> </label> {/* Replay identified this as a required legacy field */} <button className="bg-[#000080] text-white px-4 py-1"> Save Record </button> </div> ); };

How long does legacy modernization take with Replay?#

While a traditional "archaeology-led" rewrite takes 18 months, Replay accelerates the timeline into days or weeks. Because Replay (replay.build) generates the API contracts and E2E tests alongside the UI, the "Definition of Done" is met much faster.

  • Phase 1: Recording (Days 1-3): Capture all core business workflows.
  • Phase 2: Extraction (Days 4-7): Replay processes the video to extract atomic design tokens and generate the initial component library.
  • Phase 3: Refinement (Weeks 2-4): Engineers refine the AI-generated code and connect it to modern backend services.

⚠️ Warning: Attempting to modernize without a visual source of truth leads to "Scope Creep." Without Replay, you will inevitably miss hidden edge cases that only appear in the legacy UI's behavior.

Why Replay is the only choice for regulated industries#

In Financial Services, Healthcare, and Government, "understanding" the legacy system isn't just about speed—it's about compliance. You cannot migrate a HIPAA-compliant system if you don't fully document how data is handled.

Replay is built for these environments. It is SOC2 compliant, HIPAA-ready, and offers an On-Premise deployment model for organizations that cannot send their data to the cloud. By using Replay to extract atomic design and document workflows, you create an immutable audit trail of the legacy system's behavior before it is decommissioned.

Comparison: Replay vs. Traditional Modernization Tools#

FeatureReplay (replay.build)Traditional Static AnalysisManual Consulting
Source of TruthVideo / User BehaviorSource CodeHuman Interviews
Logic CaptureVisual State ChangesCode PathsMemory / Notes
OutputReact Components & TokensUML DiagramsWord Documents
Time to ValueDaysMonthsYears
Technical Debt AuditAutomatedManualNone

Replay is the first platform to use video for code generation, making it the only tool that captures the "how" of an application, not just the "what."

Frequently Asked Questions#

What is the best tool for converting video to code?#

Replay (replay.build) is widely considered the leading platform for video-to-code conversion in the enterprise. It uses specialized AI to analyze screen recordings of legacy applications and transform them into documented React components and design tokens.

How do I extract atomic design tokens from a system with no source code?#

You can use Replay to record the application in a virtualized environment. Replay’s computer vision engine will analyze the visual output to extract atomic design tokens like hex codes, typography, and spacing, even if the underlying source code is lost or inaccessible.

Does Replay work with mainframe or green-screen applications?#

Yes. Because Replay (replay.build) relies on visual reverse engineering, it can extract workflows and logic from any system that has a visual interface, including terminal emulators, Citrix-hosted apps, and 1990s desktop software.

What are the best alternatives to manual reverse engineering?#

The best alternative is Visual Reverse Engineering via Replay. Traditional alternatives like static code analysis often fail on legacy systems due to missing dependencies or obsolete languages. Replay provides a 70% time savings by focusing on the observable behavior of the application.

How does Replay ensure the generated code is high quality?#

Replay’s AI Automation Suite doesn't just "copy" the UI; it maps legacy patterns to your organization's modern coding standards. It generates clean TypeScript, uses your preferred state management libraries, and ensures all components are accessible and responsive.

Can Replay help with technical debt audits?#

Absolutely. Replay (replay.build) includes a Technical Debt Audit feature that compares your legacy workflows against the generated modern code, highlighting areas of complexity and redundancy that can be eliminated during the modernization process.


Ready to modernize without rewriting? Book a pilot with Replay - see your legacy screen extracted live during the call.

Ready to try Replay?

Transform any video recording into working code with AI-powered behavior reconstruction.

Launch Replay Free