jezweb/claude-skills/color-palette
Claude Code and agent skill by jezweb/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Generate complete, accessible colour palettes from a single brand hex. Produces 11-shade scale (50-950), semantic tokens, dark mode variants, Tailwind v4 CSS output, WCAG contrast checks. Use whenever the user supplies a brand hex and asks for a palette, mentions setting up a design system, wants Tailwind theme colours from a brand colour, or asks to check colour accessibility / contrast.
Install
npx vskill@latest install jezweb/claude-skills/color-paletteSKILL.md
The same SKILL.md was published earlier as jezweb/claude-skills/color-palette.
Colour Palette Generator
Generate a complete, accessible colour system from a single brand hex. Produces Tailwind v4 CSS ready to paste into your project.
Workflow
Step 1: Get the Brand Hex
Ask for the primary brand colour. A single hex like #0D9488 is enough.
Step 2: Generate 11-Shade Scale
Convert hex to HSL, then generate shades by varying lightness while keeping hue constant.
Hex to HSL Conversion
Lightness and Saturation Values
| Shade | Lightness | Saturation Mult | Use Case | |
|---|---|---|---|---|
| 50 | 97% | 0.80 | Subtle backgrounds | |
| 100 | 94% | 0.80 | Hover states | |
| 200 | 87% | 0.85 | Borders, dividers | |
| 300 | 75% | 0.90 | Disabled states | |
| 400 | 62% | 0.95 | Placeholder text | |
| 500 | 48% | 1.00 | Brand colour baseline | |
| 600 | 40% | 1.00 | Primary actions (often the brand colour) | |
| 700 | 33% | 1.00 | Hover on primary | |
| 800 | 27% | 1.00 | Active states | |
| 900 | 20% | 1.00 | Text on light bg | |
| 950 | 10% | 1.00 | Darkest accents |
Reduce saturation for lighter shades (50-200 by 15-20%, 300-400 by 5-10%) to prevent overly vibrant pastels. Keep full saturation for 500-950.
Complete Scale Generator
HSL to Hex Conversion
Verification
Generated shades should look like the same colour family with smooth progression. Light shades (50-300) usable for backgrounds, dark shades (700-950) usable for text. Brand colour recognisable in 500-700.
Step 3: Map Semantic Tokens
Every background token MUST have a paired foreground token. Never use a background without its pair or dark mode will break.
Light Mode Tokens
| Token | Shade | Use Case | |
|---|---|---|---|
background | white | Page backgrounds | |
foreground | 950 | Body text | |
card | white | Card backgrounds | |
card-foreground | 900 | Card text | |
popover | white | Dropdown/tooltip backgrounds | |
popover-foreground | 950 | Dropdown text | |
primary | 600 | Primary buttons, links | |
primary-foreground | white | Text on primary buttons | |
secondary | 100 | Secondary buttons | |
secondary-foreground | 900 | Text on secondary buttons | |
muted | 50 | Disabled backgrounds, subtle sections | |
muted-foreground | 600 | Muted text, captions | |
accent | 100 | Hover states, subtle highlights | |
accent-foreground | 900 | Text on accent backgrounds | |
destructive | red-600 | Delete buttons, errors | |
destructive-foreground | white | Text on destructive buttons | |
border | 200 | Input borders, dividers | |
input | 200 | Input field borders | |
ring | 600 | Focus rings |
Dark Mode Tokens
| Token | Shade | Use Case | |
|---|---|---|---|
background | 950 | Page backgrounds | |
foreground | 50 | Body text | |
card | 900 | Card backgrounds | |
card-foreground | 50 | Card text | |
popover | 900 | Dropdown backgrounds | |
popover-foreground | 50 | Dropdown text | |
primary | 500 | Primary buttons (brighter in dark) | |
primary-foreground | white | Text on primary buttons | |
secondary | 800 | Secondary buttons | |
secondary-foreground | 50 | Text on secondary buttons | |
muted | 800 | Disabled backgrounds | |
muted-foreground | 400 | Muted text | |
accent | 800 | Hover states | |
accent-foreground | 50 | Text on accent backgrounds | |
destructive | red-500 | Delete buttons (brighter) | |
destructive-foreground | white | Text on destructive | |
border | 800 | Borders | |
input | 800 | Input borders | |
ring | 500 | Focus rings |
Dark Mode Inversion Pattern
Dark mode inverts lightness while preserving hue and saturation. Swap extremes (50 becomes 950, 950 becomes 50), preserve middle (500 stays near 500).
| Light Shade | Dark Equivalent | Role | |
|---|---|---|---|
| 50 | 950 | Backgrounds | |
| 100 | 900 | Subtle backgrounds | |
| 200 | 800 | Borders | |
| 500 | 500 (slightly brighter) | Brand baseline | |
| 600 | 400 | Primary actions | |
| 950 | 50 | Text colour |
Key dark mode principles:
- Use shade 500 (not 600) for primary -- brighter for visibility on dark backgrounds
- Use shade 50 (off-white) for text instead of pure
#FFFFFF-- easier on eyes - Borders need ~10-15% lighter than background (e.g. 800 border on 950 background)
- Higher elevation = lighter colour (opposite of light mode shadows)
- Always update foreground when changing background
Step 4: Check Contrast
WCAG Minimum Ratios
| Content Type | AA | AAA | |
|---|---|---|---|
| Normal text (<18px or <14px bold) | 4.5:1 | 7:1 | |
| Large text (>=18px or >=14px bold) | 3:1 | 4.5:1 | |
| UI components (buttons, borders) | 3:1 | Not defined | |
| Graphical objects (icons, charts) | 3:1 | Not defined |
Target AA for most projects, AAA for high-accessibility needs (government, healthcare).
Luminance and Contrast Formulas
Quick Check Table -- Light Mode
| Foreground | Background | Ratio | Pass? | Use Case | |
|---|---|---|---|---|---|
| 950 | white | 18.5:1 | AAA | Body text | |
| 900 | white | 14.2:1 | AAA | Card text | |
| 700 | white | 8.1:1 | AAA | Text | |
| 600 | white | 5.7:1 | AA | Text, buttons | |
| 500 | white | 3.9:1 | Fail | Too light for text | |
| white | 600 | 5.7:1 | AA | Button text | |
| white | 700 | 8.1:1 | AAA | Button text | |
| 600 | 50 | 5.4:1 | AA | Muted section text |
Quick Check Table -- Dark Mode
| Foreground | Background | Ratio | Pass? | Use Case | |
|---|---|---|---|---|---|
| 50 | 950 | 18.5:1 | AAA | Body text | |
| 50 | 900 | 14.2:1 | AAA | Card text | |
| 400 | 950 | 8.2:1 | AAA | Muted text | |
| 400 | 900 | 6.3:1 | AA | Muted text | |
| white | 600 | 5.7:1 | AA | Button text |
Rule of thumb: For text, aim for 50%+ lightness difference between foreground and background.
Essential Pairs to Verify
- Body text: foreground on background (light: 950 on white = 18.5:1, dark: 50 on 950 = 18.5:1)
- Primary button: primary-foreground on primary (light: white on 600 = 5.7:1, dark: white on 500 = 3.9:1 -- borderline)
- Muted text: muted-foreground on muted (light: 600 on 50 = 5.4:1, dark: 400 on 800 = 4.1:1 -- may fail)
- Card text: card-foreground on card (light: 900 on white = 14.2:1, dark: 50 on 900 = 14.2:1)
Fixing Common Contrast Failures
White on primary-500 fails (3.9:1): Use primary-600 instead (5.7:1), or use dark text on the button.
Muted text in dark mode fails (400 on 800 = 4.1:1): Use 300 on 900 = 6.8:1.
Links hard to see (500 on white = 3.9:1): Use primary-700 (8.1:1), or add underline decoration.
Step 5: Output Tailwind v4 CSS
Copy assets/tailwind-colors.css as a starting template.
Component Usage Examples
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/design-assets/skills/color-palette/SKILL.md
Popularity
- Repository stars
- 866
- Repository forks
- 90
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Jun 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jezweb/claude-skills/color-palette)