Generate complete, accessible color palettes from a single brand hex. Creates 11-shade scale (50-950), semantic tokens (background, foreground, card, muted), and dark mode variants. Includes WCAG contrast checking for text accessibility. Use when: setting up design system, creating Tailwind theme, building brand colors from single hex, converting designs to code, checking color accessibility.
Generates complete accessible color palettes from a single brand hex with 11-shade scales, semantic tokens, and dark mode variants.
/plugin marketplace add jezweb/claude-skills/plugin install jezweb-tooling-skills@jezweb/claude-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdagents/palette-generator.mdreferences/contrast-checking.mdreferences/dark-mode-palette.mdreferences/semantic-mapping.mdreferences/shade-generation.mdrules/color-palette.mdtemplates/tailwind-colors.cssStatus: Production Ready ✅ Last Updated: 2026-01-14 Standard: Tailwind v4 @theme syntax
Generate complete palette from brand hex:
// Input: Brand hex
const brandColor = "#0D9488" // Teal-600
// Output: 11-shade scale + semantic tokens + dark mode
primary-50: #F0FDFA (lightest)
primary-500: #14B8A6 (brand)
primary-950: #042F2E (darkest)
background: #FFFFFF
foreground: #0F172A
primary: #14B8A6
Use the reference files to generate shades, map semantics, and check contrast.
| Shade | Lightness | Use Case |
|---|---|---|
| 50 | 97% | Subtle backgrounds |
| 100 | 94% | Hover states |
| 200 | 87% | Borders, dividers |
| 300 | 75% | Disabled states |
| 400 | 62% | Placeholder text |
| 500 | 48% | Brand color |
| 600 | 40% | Primary actions |
| 700 | 33% | Hover on primary |
| 800 | 27% | Active states |
| 900 | 20% | Text on light bg |
| 950 | 10% | Darkest accents |
Key principle: Shade 500 represents your brand color. Other shades maintain hue/saturation while varying lightness.
Convert brand hex to HSL for shade generation:
// Example: #0D9488 → hsl(174, 84%, 29%)
// H (Hue): 174deg
// S (Saturation): 84%
// L (Lightness): 29%
Generate shades by keeping hue constant, adjusting lightness:
See references/shade-generation.md for conversion formula.
Map shade scale to semantic tokens for components:
--background: white
--foreground: primary-950
--card: white
--card-foreground: primary-900
--muted: primary-50
--muted-foreground: primary-600
--border: primary-200
--primary: primary-600
--primary-foreground: white
--background: primary-950
--foreground: primary-50
--card: primary-900
--card-foreground: primary-50
--muted: primary-800
--muted-foreground: primary-400
--border: primary-800
--primary: primary-500
--primary-foreground: white
Pattern: Invert lightness while preserving relationships. See references/semantic-mapping.md.
Swap light and dark shades:
| Light Mode | Dark Mode |
|---|---|
| 50 (97% L) | 950 (10% L) |
| 100 (94% L) | 900 (20% L) |
| 200 (87% L) | 800 (27% L) |
| 500 (brand) | 500 (brand, slightly brighter) |
Preserve brand identity: Keep hue/saturation consistent, only invert lightness.
CSS pattern:
:root {
--background: white;
--foreground: hsl(var(--primary-950));
}
.dark {
--background: hsl(var(--primary-950));
--foreground: hsl(var(--primary-50));
}
WCAG minimum ratios:
Quick check pairs:
primary-600 text on white backgroundwhite text on primary-600 backgroundprimary-900 text on primary-50 backgroundFormula:
contrast = (lighter + 0.05) / (darker + 0.05)
// Where lighter/darker are relative luminance values
See references/contrast-checking.md for full formula and fix patterns.
Use @theme directive:
@theme {
--color-primary-50: #F0FDFA;
--color-primary-500: #14B8A6;
--color-primary-950: #042F2E;
--color-background: #FFFFFF;
--color-foreground: var(--color-primary-950);
}
| File | Purpose |
|---|---|
references/shade-generation.md | Hex→HSL conversion, lightness values |
references/semantic-mapping.md | Token mapping for light/dark modes |
references/dark-mode-palette.md | Inversion patterns, shade swapping |
references/contrast-checking.md | WCAG formulas, quick check table |
templates/tailwind-colors.css | Complete CSS output template |
rules/color-palette.md | Common mistakes and corrections |
Without skill: ~8-12k tokens trial-and-error for palette generation With skill: ~3-4k tokens using references Savings: ~65%
Errors prevented:
@theme {
/* Shade scale */
--color-primary-50: #F0FDFA;
--color-primary-100: #CCFBF1;
--color-primary-200: #99F6E4;
--color-primary-300: #5EEAD4;
--color-primary-400: #2DD4BF;
--color-primary-500: #14B8A6;
--color-primary-600: #0D9488;
--color-primary-700: #0F766E;
--color-primary-800: #115E59;
--color-primary-900: #134E4A;
--color-primary-950: #042F2E;
/* Light mode semantics */
--color-background: #FFFFFF;
--color-foreground: var(--color-primary-950);
--color-primary: var(--color-primary-600);
--color-primary-foreground: #FFFFFF;
}
.dark {
/* Dark mode overrides */
--color-background: var(--color-primary-950);
--color-foreground: var(--color-primary-50);
--color-primary: var(--color-primary-500);
}
@theme {
--color-primary-50: #FAF5FF;
--color-primary-500: #A855F7;
--color-primary-950: #3B0764;
--color-background: #FFFFFF;
--color-foreground: var(--color-primary-950);
--color-primary: var(--color-primary-600);
}
Next Steps: Use references/shade-generation.md to convert your brand hex to HSL and generate the 11-shade scale.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.