Command Palette

Search for a command to run...

Назад к скиллам
скилл № 31561

dark-mode

Implement complete dark mode for any frontend project. Auto-detects theme system (Flutter ThemeData, Tailwind dark class, CSS variables, MUI, Chakra UI…

БесплатноБез исполняемых скриптов
skillmdsот skillmds★ 42 звезды на GitHub

Установить dark-mode в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

You are in AUTONOMOUS MODE. Do NOT ask questions. Execute the full pipeline below without pausing for user input. Make reasonable decisions using sensible defaults.

PURPOSE: Implement a complete dark mode for the current project. Auto-detect the existing theme system, generate a dark color palette with proper contrast ratios (not just inverted colors), create a theme switching mechanism with system preference detection and persistence, update all color references to use theme tokens, and verify WCAG 2.1 AA contrast ratios for both light and dark modes.

INPUT: $ARGUMENTS

The user may specify:

  1. A dark palette preference -- specific brand colors or a reference design.
  2. Toggle behavior -- "system-only", "manual-only", "both" (default: "both").
  3. Persistence method -- localStorage, cookies, database (default: auto-detect).
  4. Scope -- specific screens or components (default: entire project). If no arguments, implement full dark mode with system detection + manual toggle + localStorage.

============================================================ PHASE 1 -- FRAMEWORK AND THEME DETECTION

Detect the frontend framework and existing theme system:

Indicator Framework Theme Mechanism
pubspec.yaml Flutter ThemeData.light() / ThemeData.dark() + ThemeMode
tailwind.config.* with darkMode Tailwind CSS class or media strategy
next-themes or package.json with "next" Next.js next-themes or CSS variables
package.json with "react" React CSS variables + context/state
package.json with "vue" Vue CSS variables + composable/plugin
package.json with "@angular/core" Angular CSS variables + service
styled-components/emotion CSS-in-JS ThemeProvider with theme object
package.json with "@mui/material" MUI createTheme with mode
package.json with "@chakra-ui/react" Chakra UI useColorMode

Check for existing dark mode infrastructure:

  • Existing dark theme definition
  • prefers-color-scheme media query usage
  • Theme toggle component
  • Color scheme CSS property
  • data-theme or class-based theme switching

Record: FRAMEWORK, THEME_SYSTEM, EXISTING_DARK_MODE, LIGHT_PALETTE, TOKEN_FILE

============================================================ PHASE 2 -- LIGHT PALETTE ANALYSIS

Extract the complete light mode color palette:

Step 2.1 -- Catalog Light Colors

Read the existing theme/token files and all color references:

  • Background colors (page, card, surface, overlay, input)
  • Text colors (primary, secondary, disabled, placeholder, inverse)
  • Border colors (default, focus, error, divider)
  • Brand colors (primary, secondary, accent with their scales)
  • Semantic colors (error, warning, success, info)
  • Shadow colors and opacity values
  • Interactive state colors (hover, active, focus, disabled)

For each color, record:

Token/Variable Light Value Usage Category Contrast Context

Step 2.2 -- Identify Contrast Pairs

Map which colors appear together as foreground/background pairs:

  • Text on page background
  • Text on card/surface background
  • Text on primary color background
  • Icon on background
  • Border on background
  • Placeholder text on input background

These pairs will be validated for contrast in both modes.

============================================================ PHASE 3 -- DARK PALETTE GENERATION

Generate a dark color palette following established dark mode design principles.

Step 3.1 -- Background Scale

Create the dark background hierarchy (surfaces layer UP in darkness):

  • Page background: A very dark base (not pure black #000 -- use #121212 or dark gray)
  • Surface 1 (cards): Slightly elevated from base (add 5% white overlay equivalent)
  • Surface 2 (dialogs, dropdowns): More elevated (8% white overlay)
  • Surface 3 (tooltips, popovers): Highest elevation (11% white overlay)
  • Each level should be distinguishable but subtle

Step 3.2 -- Text Colors

Generate text colors for dark mode:

  • Primary text: High emphasis -- white at 87% opacity or #E0E0E0 range
  • Secondary text: Medium emphasis -- white at 60% opacity or #A0A0A0 range
  • Disabled text: Low emphasis -- white at 38% opacity
  • Placeholder: Between secondary and disabled
  • All must meet WCAG AA contrast against their background surfaces

Step 3.3 -- Brand Color Adaptation

Adapt brand/primary colors for dark backgrounds:

  • Desaturate slightly -- fully saturated colors vibrate on dark backgrounds
  • Increase lightness -- dark mode primary should be lighter than light mode primary
  • Maintain recognizability -- the color should still read as the same brand
  • Test: primary color on dark surface must have 4.5:1 contrast for text, 3:1 for large text/UI

Step 3.4 -- Se

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл dark-mode?

Implement complete dark mode for any frontend project. Auto-detects theme system (Flutter ThemeData, Tailwind dark class, CSS variables, MUI, Chakra UI, styled-components), generates a dark color palette with proper surface elevation hierarchy and desaturated brand colors, creates a theme toggle with system preference detection and persistence, migrates all hardcoded colors to theme tokens, handles special cases like images, shadows, form inputs, and charts, then verifies WCAG AA contrast ratios for both modes. Use when you need to add dark mode, fix dark theme contrast issues, create a theme switcher, or migrate hardcoded colors to theme-aware tokens.

Как установить скилл dark-mode?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dark-mode запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить dark-mode с