Skip to content
Design
Command

/theme-swap

Recolour an extracted site's design around a new brand primary. OKLCH hue rotation preserves perceptual lightness — neutrals, type, spacing, and motion stay untouched. Side-by-side HTML preview + recoloured tokens (DTCG, Tailwind, shadcn, Figma).

From plugin
designlang
5.2k14 skills14 commands
> /plugin marketplace add manavarya09/design-extract
> /plugin install designlang@designlang

Command definition

theme-swap.md
description: Recolour an extracted site's design around a new brand primary. OKLCH hue rotation preserves perceptual lightness — neutrals, type, spacing, and motion stay untouched. Side-by-side HTML preview + recoloured tokens (DTCG, Tailwind, shadcn, Figma).
argument-hint: <url> --primary <hex>  [--from <hex>] [--open]

Take any extracted site and swap its brand primary to the user-provided hex. The whole palette rotates around that hue while neutrals and structural tokens stay put.

npx designlang theme-swap $ARGUMENTS

If `$ARGUMENTS` doesn't contain both a URL and `--primary <hex>`, ask the user for the missing piece.

After the run completes, all output goes to `./design-extract-output/`:

  • `*.themeswap.html` — editorial side-by-side preview (open this)
  • `*.themeswap.md` — markdown diff table
  • `*.themeswap.json` — structured before→after deltas
  • `*.themeswap.tokens.json` — recoloured DTCG token set you can drop into a project

After the command finishes:

1. Read `*.themeswap.md` to summarise the swap (`from → to`, hue shift, count of changed colours). 2. Show the user the verdict line ("X colours changed, neutrals preserved, type/spacing/motion untouched"). 3. Offer to open the HTML preview (`--open` does this automatically). 4. Suggest the recoloured token files as drop-ins for an existing Tailwind / shadcn project.

Useful flags

| Flag | Effect | |---|---| | `--primary <hex>` | **required.** Target brand colour (e.g. `"#ff4800"`). | | `--from <hex>` | Override the auto-detected source primary when the extractor misclassifies (e.g. a neutral got promoted by usage count). | | `--format html\|md\|json\|tokens\|all` | Pick the output(s). Default `all`. | | `--out <dir>` | Output directory. Default `./design-extract-output`. | | `--open` | Open the HTML preview in your default browser. |

Pairs nicely with

  • `/grade <url>` — grade the recoloured site by feeding the same target through `/extract` then `/grade`.
  • `/pack <url>` — bundle the recoloured tokens as a downloadable design-system folder.
  • `/remix <url> --as <vocab>` — full vocabulary swap (brutalist, art-deco, cyberpunk…) instead of just brand colour.
Read more
@manavarya09
Ships withdesignlang

Extract any website's complete design system with one command. DTCG tokens, semantic+primitive+composite, MCP server for Claude Code/Cursor/Windsurf, multi-platform emitters (iOS SwiftUI, Android Compose, Flutter, WordPress), Tailwind v4, Figma variables, shadcn/ui, CSS health audit, WCAG remediation, Chrome extension. MIT, Playwright, Node 20+.

Stars on GitHub

Momentum

stars in total
5.2k
Star history of manavarya09/design-extract on GitHub, a chart by star-history.com

Other commands on designlang.

battle

battle

Command

Head-to-head graded battle card between two sites — eight dimensions, bar-by-bar, verdict line.

@manavarya09@manavarya09Install Command
brand

brand

Command

Generate a full editorial brand-guidelines book for any URL. 14 chapters covering brand essence/archetype, colour, typography,…

@manavarya09@manavarya09Install Command
dna

dna

Command

Place a design in the measured design space — nearest systems, per-axis percentiles, outliers

@manavarya09@manavarya09Install Command
extract

extract

Command

Extract the complete design language from a URL — DTCG tokens, Tailwind, Figma vars, motion, voice, components.

@manavarya09@manavarya09Install Command
fidelity

fidelity

Command

Measure how faithfully a clone reproduces a site — pixel-diff plus motion-fidelity into one 0-100 score, a letter grade, a ranked…

@manavarya09@manavarya09Install Command
gallery

gallery

Command

Build a static, shareable gallery from your fidelity reports — an index of score cards plus a permalink page (with an OG card)…

@manavarya09@manavarya09Install Command

More commands from other plugins.

od-contribute
Auto-invoked

od-contribute

Command

Open a first-contribution PR (or bug issue) on nexu-io/open-design — works for non-coders too.

@nexu-io@nexu-ioInstall Command
design-deslop

design-deslop

Command

Strip the signatures that make a UI look AI-generated — flat hierarchy, no focal point, monotone layout, timid palettes, generic…

@dammyjay93@dammyjay93Install Command