Theme/color selection when user has no aesthetic direction and wants agent to decide. Use when: user is uncertain — "suggest colors", "what theme", "help me choose", "you pick". Keywords: suggest theme, suggest colors, what theme, what colors, help choose, help pick, no direction, you choose, recommend colors Do NOT use for: user has colors/style in mind, applying existing theme.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: frontend-design-theme-factory description: | Theme/color selection when user has no aesthetic direction and wants agent to decide. Use when: user is uncertain — "suggest colors", "what theme", "help me choose", "you pick". Keywords: suggest theme, suggest colors, what theme, what colors, help choose, help pick, no direction, you choose, recommend colors Do NOT use for: user has colors/style in mind, applying existing theme.
Theme Factory
Purpose
Generate cohesive, beautiful UI themes when no design specifications provided, preventing generic monotone interfaces.
Core Principle
Brand personality drives design decisions.
Every UI communicates personality through color, typography, and style. Rather than defaulting to arbitrary colors, ask about brand personality first, then generate cohesive themes that match.
Good theme = Intentional, cohesive, personality-aligned Bad theme = Random colors, inconsistent, no personality
When to Use Theme Factory
Use when user EXPLICITLY asks for theme help:
- "What theme should I use?"
- "Help me pick colors"
- "What colors work well together?"
- User uncertain about aesthetic choices
Don't use if:
- User has clear aesthetic in mind → design-fundamentals handles it
- Figma file/URL provided → use figma-design-extraction
- User already chose colors/fonts → just apply them
Theme Selection Process
Step 1: Understand Brand Personality
Ask user (concise, 1-2 questions max):
Question 1: "What personality should this UI have?"
- Professional - Corporate, trustworthy, business-focused
- Creative - Bold, artistic, unique, expressive
- Minimal - Clean, sophisticated, simple, timeless
- Bold/Tech - Modern, eye-catching, innovative
- Warm/Organic - Natural, welcoming, friendly
- Playful - Fun, colorful, approachable, energetic
Question 2: "Any color preferences or inspirations?"
- Specific colors they like
- Competitor/inspiration URLs
- Or: "Auto-generate based on personality"
Step 2: Present Theme Options
Show 2-3 pre-defined themes from .claude/themes/ matching personality
Example:
1. Professional Blue - Corporate, trustworthy, clean
2. Minimal Monochrome - Sophisticated, timeless
3. Generate custom theme based on your preferences
If user wants custom: Generate based on personality + color preferences
Theme Anatomy
1. Colors
Primary Palette (shades 50-900):
- Used for: Main actions, links, buttons, key UI elements
- Scale: 50 (lightest) → 900 (darkest)
Neutral Palette (50-900):
- Used for: Text, backgrounds, borders, subtle UI
- Principle: True grays or slightly tinted toward primary
Semantic Colors:
- Success: Green (growth, positive, confirmation)
- Warning: Yellow/orange (caution, attention)
- Error: Red (danger, mistakes, destructive)
- Info: Blue (information, neutral)
Why this structure:
- Full palette enables light/dark modes
- Semantic colors ensure accessibility
- Neutrals provide visual breathing room
Dark Mode Variant
Derive dark palette from the same hue — don't invent new colors.
| Role | Light mode | Dark mode |
|---|---|---|
| Page background | neutral-50 | neutral-950 |
| Surface (card/panel) | neutral-100 | neutral-900 |
| Surface hover | neutral-200 | neutral-800 |
| Body text | neutral-700 | neutral-200 |
| Heading text | neutral-900 | neutral-50 |
| Border | neutral-200 | neutral-700 |
| Primary action | primary-600 | primary-400 |
| Primary text on surface | primary-700 | primary-300 |
Key rules:
- Primary hue stays the same — only shift lightness (600→400 for dark)
- Semantic colors (success/error/warning) lighten ~100-200 steps in dark mode
- Never use the same shade for both modes — always invert the scale direction
2. Typography
See design-fundamentals for typography pairing principles.
Theme should define:
- Font families (heading + body)
- Type scale values
- Font weights available
- Line heights
3. Spacing System
See design-fundamentals for spacing scale principles.
Theme should define:
- Base unit (4px or 8px)
- Scale values
4. Visual Properties
Border Radius:
- Minimal: Small or none (sharp, clean)
- Friendly: Medium roundness (approachable, soft)
- Playful: Large roundness or full pill shapes (fun, organic)
Shadows:
- Subtle shadows for depth (professional, minimal)
- Stronger shadows for cards/modals (modern, bold)
- No shadows for flat design (minimalist)
- Define elevation system (subtle/medium/strong)
Contrast Check
WCAG AA minimums (required):
- Normal text (< 18px): 4.5:1
- Large text (≥ 18px bold / ≥ 24px): 3:1
- UI components (buttons, inputs, icons): 3:1
Must-check pairs for every theme:
| Pair | Target | Common failure |
|---|---|---|
| Body text on page background | 4.5:1 | Light gray text on white |
| Heading on page background | 4.5:1 | Medium neutral on light neutral |
| White text on primary button | 4.5:1 | Light primaries (yellow, lime) |
| Primary text on white | 4.5:1 | Mid-range primaries (400-500) |
| Placeholder text on input | 3:1 | neutral-400 on white |
Quick mental check — the 4.5:1 rule of thumb:
- Dark text on light bg: text must be ≤ neutral-600 on neutral-50
- Light text on dark bg: text must be ≥ neutral-200 on neutral-900
- Primary-500 on white usually fails — use primary-600 or darker for text/icons
If primary color is light (yellow, lime, teal-300):
- Never use as button background with white text → use dark text instead
- Or shift to primary-700 for text, primary-600 for buttons
Color Theory Foundations
Color Harmony Methods
Complementary - Opposites on color wheel:
- High contrast, energetic, bold
- Example: Blue + Orange, Red + Green
- Use for: Bold, tech, creative personalities
Analogous - Adjacent on color wheel:
- Harmonious, calm, cohesive
- Example: Blue + Purple + Teal
- Use for: Professional, minimal, warm personalities
Triadic - Three evenly spaced:
- Balanced, vibrant, dynamic
- Example: Red + Yellow + Blue
- Use for: Playful, creative personalities
Monochromatic - Single hue, varying lightness:
- Clean, sophisticated, minimal
- Use for: Minimal, professional personalities
Color Psychology
Quick reference:
- Blue = Trust, professional
- Green = Growth, health
- Purple = Creativity, luxury
- Red = Energy, urgency
- Orange = Friendly, energetic
- Yellow = Optimism, playfulness
- Neutral = Sophisticated, minimal
When choosing colors:
- Consider brand personality
- Use color harmony methods for cohesive palettes
- Verify contrast ratios meet WCAG AA
Theme Documentation Format
In planning doc:
## Theme Specification
### Selected Theme
- Name: [Theme Name]
- Source: .claude/themes/[filename].theme.json OR "Custom generated"
- Personality: [personality traits]
### Color Palette
**Primary ([Color Name]):**
- Base: [hex] (buttons, links, actions)
- Hover: [hex]
- Active: [hex]
- Full scale: 50-900 shades
**Neutral:**
- Lightest: [hex] (backgrounds)
- Medium: [hex] (body text)
- Darkest: [hex] (headings)
- Full scale: 50-900 shades
**Semantic:**
- Success: [hex] / dark: [hex]
- Error: [hex] / dark: [hex]
- Warning: [hex] / dark: [hex]
- Info: [hex] / dark: [hex]
### Dark Mode Palette
- Background: [hex] (neutral-950)
- Surface: [hex] (neutral-900)
- Body text: [hex] (neutral-200)
- Heading: [hex] (neutral-50)
- Border: [hex] (neutral-700)
- Primary action: [hex] (primary-400)
### Contrast Verification
- Body text / background: [ratio]:1 ✓/✗
- White / primary button: [ratio]:1 ✓/✗
- Primary text / white: [ratio]:1 ✓/✗
### Typography
- Heading: [Font family], [weight], [line-height]
- Body: [Font family], [weight], [line-height]
- Scale: [values]
### Spacing
- Scale: [values - base-4 or base-8]
### Visual Style
- Border radius: [small/medium/large]
- Shadows: [subtle/medium/strong]
Theme Application Guidelines
Consistency Rules:
Do:
- Use only colors from theme palette
- Apply spacing scale consistently
- Follow typography scale
- Use semantic colors for their intended purpose
Don't:
- Mix colors from multiple themes
- Use arbitrary values
- Override theme for one-off styles
- Ignore semantic color meanings
Component Theming:
Buttons:
- Primary: Primary color background
- Secondary: Secondary/neutral background
- Outline: Transparent background, primary border
- Ghost: Transparent, primary text only
States:
- Hover: Slightly darker/more saturated
- Active: Noticeably darker than hover
- Disabled: Muted neutral shades
- Focus: Primary color ring
Common Mistakes
- No personality - Generic theme → Fix: Choose personality first
- Arbitrary tweaks - Modifying theme colors slightly → Fix: Use theme palette exactly as defined
- Semantic color abuse - Green button for delete → Fix: Red (error) for destructive, green (success) for positive
- Ignoring color harmony - Random combinations → Fix: Use color harmony methods
- Theme mixing - Using colors from multiple themes → Fix: Commit to one theme
- Copying examples literally - Using exact values from docs → Fix: Generate unique values matching personality
Validation Checklist
- Brand personality identified
- Color harmony method used
- Primary palette complete (50-900 shades)
- Neutral palette defined (50-900 shades)
- Semantic colors defined
- Typography pairing chosen
- Type scale defined
- Spacing scale defined
- Border radius values chosen
- Shadow system defined
- Theme documented in planning doc
- All colors pass WCAG AA contrast
- Key contrast pairs verified (text/bg, white/primary, primary/white)
- Dark mode palette derived (neutral scale inverted, primary shifted)
- Dark mode semantic colors adjusted (+100-200 steps lighter)
Key Takeaway
Color harmony + brand personality = cohesive themes.
When users need help choosing colors/fonts:
- Ask brand personality
- Apply color harmony methods
- Generate complete theme specification
- Apply using design-fundamentals principles
Theme-factory provides interactive selection and color theory methods. Design-fundamentals provides application principles and technical foundation.
Together: Distinctive, cohesive, accessible UI themes.
More by phananhtuan09
View allMobile-first responsive design for beautiful, multi-device UIs. Breakpoints, fluid layouts,touch optimization, and creative responsive patterns for distinctive experiences across screens.Use when building responsive UIs or adapting for mobile/tablet/desktop:- Creating mobile-first layouts, responsive landing pages, web apps- Defining breakpoints and fluid typography (mobile/tablet/desktop sizes)- Optimizing for touch devices, mobile users, smartphone/tablet interactions- Responsive component patterns (navigation, tables, forms, images)- User mentions "mobile", "responsive", "tablet", "multi-device", "touch"Keywords: responsive, mobile-first, mobile, tablet, desktop, breakpoints, touch, multi-deviceMobile-first approach: Design for mobile constraints first, enhance progressively.Integrates with design-fundamentals: Apply spacing, typography, color systems responsively.
Accessibility principles for inclusive design - keyboard navigation, screen readers, ARIA, color contrast, and focus management. WCAG compliance for interfaces usable by all. Use when implementing interactive UI components requiring accessibility: - Forms, buttons, links, interactive elements needing keyboard access - Keyboard navigation, focus management, tab order - Screen reader support with semantic HTML and ARIA attributes - Color contrast validation for text/buttons (WCAG AA/AAA standards) - Modals, dialogs, dropdowns needing focus trapping - User mentions "accessible", "WCAG", "disabilities", "keyboard", "screen reader" Keywords: accessible, accessibility, WCAG, keyboard, screen reader, ARIA, contrast, a11y Focus on making UI usable via keyboard, screen readers, assistive technologies.
Code quality validation through linting, type checking, and build verification. Multi-language support for automated quality gates. Use when validating code quality: - After implementation to validate code meets standards - Before creating pull requests or commits - When debugging build/type/lint issues - User explicitly requests quality checks Provides language-specific tool commands and validation workflows for: - JavaScript/TypeScript (ESLint, tsc, build tools) - Python (Ruff, MyPy, Pyright) - Go (golangci-lint, go build) - Rust (Clippy, cargo check/build) - Java (Gradle, Maven) Focuses on detecting issues early through systematic automated checks.
Interactive UI theme generation when user needs help choosing colors/fonts.Generates cohesive themes based on brand personality using color harmony theory.Use when user asks for theme/color help OR building UI without design:- "What theme should I use?" "Help me pick colors" "Generate theme"- "What colors work well together?" "Suggest color palette"- User uncertain about design direction, needs aesthetic suggestions- Building UI/landing page with no design specs, needs complete themeKeywords: theme, color palette, colors, fonts, brand personality, color harmonyInteractive workflow: Ask personality → Present options → Generate custom theme.References pre-defined themes in .claude/themes/.Do NOT load for: User has clear aesthetic/colors, Figma/design file provided.Integrates with design-fundamentals: Generates themes following design principles.
