Theme Generator
VerifiedGenerate multi-mode design tokens and theme configurations for light/dark modes, brand palettes, and CSS custom properties compatible with any design system.
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
Cursor
Freemium
AI-native code editor with deep multi-model integration and agentic coding
- AI-native Cmd+K inline editing and generation
- Composer Agent for autonomous multi-file changes
- Full codebase indexing and context awareness
v0 by Vercel
Freemium
AI UI generator that creates production-ready React components from prompts
- Production-ready React/Next.js component generation
- shadcn/ui and Tailwind CSS output
- Image and screenshot to code conversion
Claude
Freemium
Anthropic's AI assistant built for thoughtful analysis and safe, nuanced conversations
- 200K token context window for massive document processing
- Artifacts — interactive side-panel for code, docs, and visualizations
- Projects with persistent context and custom instructions
Related Skills
Design System Builder
CautionSets up design token systems, component libraries, and style guides with consistent theming, spacing scales, and typography hierarchies.
Color Palette Generator
VerifiedGenerates harmonious color schemes with WCAG accessibility checks, contrast ratio validation, and export to CSS custom properties or design tokens.
Tailwind CSS Converter
VerifiedConvert traditional CSS, SCSS, and styled-components to Tailwind utility classes with responsive and dark mode support.
Stay Updated on Agent Skills
Get weekly curated skills + safety alerts
每周精选 Skills + 安全预警