Skip to main content
skill CX Codex

dark-mode-converter — Claude Code skill for dark themes

The dark-mode-converter Claude Code skill turns a light-only project into a dark theme built around semantic color roles. It also wires up theme switching and saved preferences.

MIT 108 installs ★ 440 updated 2026-10-20

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a claude-code
Open on GitHub

What dark-mode-converter does

The skill scans project colors and moves hardcoded values into semantic tokens before shaping a dark palette. Raised surfaces get lighter than the base, text avoids pure white, and accent colors are adjusted for dark backgrounds. Text and surface pairs are checked against WCAG AA.

It configures the theme for Tailwind or CSS variables, then adds light, dark, and system settings with localStorage persistence. An inline script in <head> applies the theme before the first paint; system mode responds to OS preference changes without a reload. The workflow also covers images with white backgrounds, charts, native form controls, and third-party widgets.

For the final pass, the skill walks key routes in both modes and writes dark-mode-report.md with the token map, changed files, contrast table, and remaining design checks. A screenshot set or a list of routes is needed for that review. Prompts can request a full conversion, color tokenization, palette design, or an audit of an existing dark theme.

What it helps with

  • move hardcoded colors into semantic tokens
  • design a dark palette with lighter raised surfaces
  • add theme switching and save the selected mode
  • spot unreadable text and leftover light surfaces
  • produce a report of token mappings and contrast

Example prompts for the agent

  • Convert this project to a dark theme.
  • Map the project’s colors to semantic tokens first.
  • Audit the existing dark mode and write dark-mode-report.md.

How to install dark-mode-converter

1Skills CLI (Vercel)

npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a claude-code

2Manually: put the files in place

~/.claude/skills/dark-mode-converter/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/dark-mode-converter/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about dark-mode-converter

How do I install dark-mode-converter in Claude Code?

Run npx skills add OneWave-AI/claude-skills --skill dark-mode-converter -a claude-code. The skill file is at ~/.claude/skills/dark-mode-converter/SKILL.md.

What does dark-mode-converter do?

It converts a light-only project into a dark theme, organizing colors by semantic role and adding theme switching with saved preferences. It finishes by creating dark-mode-report.md.

How does dark-mode-converter audit an existing dark theme?

It reviews key routes in both modes for stranded light surfaces, low-contrast text, borders, and accent buttons. The report includes a contrast table and items for design review.

Source text

SKILL.md · MIT
---
name: dark-mode-converter
description: Convert a light-only site or app to a real dark mode -- semantic token mapping, elevation-based surfaces, recalibrated shadows and imagery -- not a naive inversion. Handles Tailwind, CSS variables, and styled-components, plus the toggle, persistence, and no-flash boot.
tools: Read, Glob, Grep, Write, Edit, Bash
model: inherit
---

# Dark Mode Converter

Build dark mode the way design-mature products do: as a second theme with its own logic, not the light theme with colors flipped. Inversion fails because dark UIs work differently -- elevation is communicated by lighter surfaces instead of shadows, saturated colors vibrate on dark backgrounds, and pure black plus pure white is glare, not contrast.

## Workflow

1. **Tokenize first.** Inventory every color in the codebase. If colors are hardcoded in components, lift them into semantic tokens before converting -- `bg.base`, `surface`, `surface.raised`, `text.primary`, `text.muted`, `border`, `accent`, states. A dark mode built on raw hex replacements breaks on the next feature. (If tokens exist, audit for strays with the same sweep.)
2. **Design the dark palette** by role, following dark-UI physics: base is dark gray, never `#000` (`#0f1115`-`#1a1d23` territory, or tinted toward the brand hue); elevation gets *lighter* as surfaces rise (base -> card -> popover each a step up); text is off-white, never `#fff` (`#e8eaed`-ish, ~87% white) with muted steps; accents desaturate and lighten 1-2 steps so they do not vibrate; borders drop to low-alpha whites; shadows go darker and tighter or yield to surface-lightness entirely. Verify every text/surface pair at WCAG AA minimum.
3. **Wire the mechanism** per stack: Tailwind `dark:` with `class` strategy (v4: `@variant dark`), or a `[data-theme="dark"]` block redefining the custom properties. Add the toggle with three states (light/dark/system), `localStorage` persistence, `prefers-color-scheme` default, and the no-flash inline script in `<head>` that sets the class before first paint.
4. **Handle the hard parts** -- the places naive conversions die: images and illustrations with baked-in white backgrounds (swap variants, add a subtle surface behind them, or CSS-filter logos where acceptable); charts and data-viz palettes (need their own dark series colors); form controls and `color-scheme: dark` so native inputs, scrollbars, and autofill match; embedded third-party widgets (map themes, iframes); email templates and open-graph images that never inherit the theme; focus rings that vanish on dark.
5. **Audit pass.** Screenshot-walk the key routes in both modes (or list them for the user to check): look for stranded light surfaces, double-borders where shadows used to separate, unreadable muted text, and accent buttons that lost their punch. Output `dark-mode-report.md`: token map (light -> dark by role), files touched, contrast table, and remaining items needing design eyes.

## Rules

- Semantic tokens or nothing. `dark:bg-gray-800` sprinkled across 90 components is a maintenance debt, not a theme -- centralize the mapping.
- Never pure black base, never pure white text. Reserve those for moments, not defaults.
- Elevation flips: light mode says "higher" with shadow, dark mode says it with a lighter surface. Convert the logic, not just the colors.
- Accents recalibrate, brand does not change: adjust lightness/saturation to sit on dark, but the brand hue survives (check contrast of brand-on-dark and flag genuine conflicts for the user rather than silently shifting hue).
- Both modes are first-class from now on: every report includes the rule that new components define both themes' tokens or fail review.
- Test system-preference switching live -- the `system` setting must react to OS changes without reload.

## Quick Commands

- "Convert this project to dark mode" -- full workflow
- "Tokenize my colors first" -- step 1 standalone
- "Just design the dark palette" -- step 2 from existing tokens
- "Dark mode audit" -- step 5 against an existing implementation

© OneWave-AI · MIT · OneWave-AI/claude-skills

Similar skills

All skills for Frontend and UI →

From the same set185

The whole set →
typography-scale-builder typography-scale-builder — a Claude Code skill that designs typographic systems with modular or fluid type scales. It audits existing font values across the codebase and outputs design tokens, CSS, and Tailwind configs. CX Codex +1 116installs local-seo-optimizer local-seo-optimizer — a Claude Code skill for local SEO audits and Google Business Profile optimization. Identifies listing gaps and benchmarks performance against map pack competitors. CX Codex +1 114installs cowork-rfp-response cowork-rfp-response — a skill for Claude Code that shreds RFP documents and maps requirements against company archives. It flags unanswerable criteria and disqualifiers before drafting starts. CX Codex +1 112installs review-response-writer The review-response-writer Claude Code skill drafts review replies in the owner’s voice and sorts reviews by situation. It flags mentions of injury, illness, discrimination, or legal threats for the owner. CX Codex +1 110installs cowork-folder-organizer cowork-folder-organizer — a skill for Claude Code and Codex that tidies chaotic folders and shared drives. Scans the directory, proposes a folder hierarchy, and waits for user approval before moving any files. CX Codex +1 108installs cowork-hiring-screener cowork-hiring-screener — a Claude Code skill that scores resumes against a job description and ranks candidates with supporting evidence. It takes a resume folder and the role requirements. CX Codex +1 107installs design-tokens-sync design-tokens-sync — a skill for Claude Code tracks drift between canonical design tokens and UI code. It catches hardcoded values, outdated duplicates, and unused variables across stylesheets. CX Codex +1 107installs cowork-inbox-triage cowork-inbox-triage — a Claude Code skill that triages unread email via Microsoft 365 or Gmail MCP connectors. Scans threads from the last 24 hours and prepares drafts for review. CX Codex +1 106installs

Project sponsors

Companies that keep this analytics open