Skip to content

Theme Generator

Verified

Generate multi-mode design tokens and theme configurations for light/dark modes, brand palettes, and CSS custom properties compatible with any design system.

By community 4,100 v1.3.0 Updated 2026-03-08

Install

Claude Code

Copy the SKILL.md file to .claude/skills/theme-generator.md

About This Skill

Theme Generator creates comprehensive design token systems that power consistent theming across light mode, dark mode, and branded variants.

Token Architecture

  • Follows the W3C Design Tokens Community Group spec with three tiers:
  • Primitive tokens — Raw values (color/blue/500: #3b82f6)
  • Semantic tokens — Intent-based references (color/action/primary: {color/blue/500})
  • Component tokens — Component-scoped overrides (button/background/default: {color/action/primary})

Color Science

Generates perceptually uniform color scales using OKLCH color space. Given a brand hex color, calculates a full 11-step scale (50-950) with consistent perceived lightness steps. Dark mode tokens are computed, not manually specified, using the OKLCH lightness inversion algorithm.

WCAG Compliance

Automatically checks foreground/background token pairs against WCAG 2.1 contrast requirements (4.5:1 for normal text, 3:1 for large text). Flags failing combinations and suggests compliant alternatives.

Output Formats

  • CSS custom properties (`:root` and `.dark` selectors)
  • Tailwind CSS `theme.extend` config
  • Style Dictionary JSON for cross-platform token distribution
  • TypeScript theme object with full intellisense

Framework Integration

Compatible with shadcn/ui, Radix UI, MUI, and Chakra UI token systems. Generates mapping shims for each.

Use Cases

  • Generating a complete light/dark mode token set from a single brand color
  • Creating Tailwind CSS theme config from Figma design token JSON export
  • Building CSS custom property themes compatible with shadcn/ui component library
  • Generating color scales with proper WCAG 2.1 contrast ratios

Pros & Cons

Pros

  • + OKLCH-based color scales have perceptually consistent lightness steps
  • + Dark mode tokens computed automatically, not manually maintained
  • + WCAG contrast checking built in, not an afterthought
  • + Three-tier token architecture scales from small projects to design systems

Cons

  • - OKLCH color space requires modern browser support (baseline 2023)
  • - Style Dictionary output requires additional build pipeline setup

Related AI Tools

Related Skills

Stay Updated on Agent Skills

Get weekly curated skills + safety alerts

每周精选 Skills + 安全预警