Color Palette Skill
Purpose
Provide comprehensive color palette tooling: generate palettes from seed colors, analyze existing palettes, compare options, export to development formats, and suggest palettes based on project context.
When This Skill Applies
- User asks to "generate a color palette" or "pick colors"
- User provides a color and wants complementary/matching colors
- User asks to "analyze this palette" or "check these colors"
- User wants to export colors to CSS, Tailwind, or design tokens
- User asks to compare two palettes
- User needs color suggestions for a project type or mood
- User wants to extract colors from an image
Trigger Phrases
| Natural Language |
Action |
| "Generate a palette from #3498db" |
Generate palette with seed color |
| "What colors go with forest green?" |
Generate complementary/harmony palettes |
| "Analyze this palette: #1a1a2e, #e94560" |
Run harmony + contrast + mood analysis |
| "Compare these two palettes" |
Side-by-side comparison |
| "Export my palette as Tailwind config" |
Format conversion |
| "Suggest colors for a fintech app" |
Industry-aware suggestion |
| "Extract colors from this image" |
Dominant color extraction |
| "I need a dark mode version of this palette" |
Light/dark variant generation |
Subcommands
generate
Generate a palette from a seed color, mood, or theme.
Parameters:
--seed <color> — Starting color (HEX, RGB, or HSL)
--harmony <model> — Harmony model (complementary, analogous, triadic, split-complementary, tetradic, monochromatic). Default: analogous
--count <N> — Number of colors to generate. Default: 5
--mood <text> — Mood descriptor (professional, playful, calm, energetic, luxurious, natural)
--temperature <warm|cool|neutral> — Color temperature bias
Process:
- Parse the seed color into HSL for manipulation
- Apply the selected harmony model:
| Model |
Algorithm |
| Complementary |
Seed + (hue + 180 degrees) |
| Analogous |
Seed + (hue +/- 30 degrees) |
| Triadic |
Seed + (hue + 120) + (hue + 240) |
| Split-complementary |
Seed + (hue + 150) + (hue + 210) |
| Tetradic |
Seed + (hue + 90) + (hue + 180) + (hue + 270) |
| Monochromatic |
Seed at varied lightness (20%, 40%, 60%, 80%) and saturation |
Adjust for mood if specified:
- Professional: reduce saturation 10-20%, medium lightness
- Playful: increase saturation 10-20%, varied lightness
- Calm: reduce saturation 20-30%, shift toward blue/green hues
- Energetic: increase saturation, shift toward warm hues
- Luxurious: deep tones, add gold (#C9A96E) or dark accent
- Natural: earth tones, greens, warm browns
Generate tints and shades to fill count if needed
Output the palette with visualization
Output Format:
Palette: Triadic from #2D5A27
#2D5A27 ██████ Forest Green (H:113 S:37% L:25%)
#27355A ██████ Navy Shadow (H:220 S:37% L:25%)
#5A2735 ██████ Burgundy Dark (H:347 S:37% L:25%)
#4A8A3F ██████ Leaf Green (H:113 S:37% L:39%) [tint]
#3F558A ██████ Steel Blue (H:220 S:37% L:39%) [tint]
Harmony: Triadic (120 degree separation)
Temperature: Cool-neutral
Mood: Natural, grounded, trustworthy
analyze
Analyze an existing palette for harmony, contrast, accessibility, and mood.
Parameters:
--palette <colors> — Comma-separated color values
Process:
- Parse all colors into HEX, RGB, and HSL
- Identify the closest harmony model
- Calculate all pairwise contrast ratios (WCAG formula)
- Determine color temperature (average hue warmth)
- Assess color psychology associations
- Score overall palette coherence
Output: Uses templates/palette-report.md template.
compare
Compare two or more palettes side-by-side.
Parameters:
--a <colors> — First palette
--b <colors> — Second palette
--criteria <list> — What to compare (harmony, contrast, accessibility, mood, temperature). Default: all
Output:
Palette Comparison
Palette A Palette B
Colors: #264653,#2a9d8f,... #1a1a2e,#16213e,...
Harmony: Analogous Monochromatic
Temperature: Cool Cool
Mood: Calm, trustworthy Dark, mysterious
WCAG AA: 4/6 pairs pass 3/6 pairs pass
Avg Contrast: 5.2:1 4.1:1
Winner: ← Better accessibility → Stronger mood coherence
export
Export palette in a target development format.
Parameters:
--palette <colors> — Colors to export
--format <fmt> — Target format: hex, rgb, hsl, css, tailwind, tokens
--names <list> — Optional semantic names (primary, secondary, accent, etc.)
Output by format:
CSS Custom Properties
:root {
--color-primary: #264653;
--color-secondary: #2a9d8f;
--color-accent: #e9c46a;
--color-warning: #f4a261;
--color-danger: #e76f51;
}
Tailwind Config
module.exports = {
theme: {
extend: {
colors: {
primary: '#264653',
secondary: '#2a9d8f',
accent: '#e9c46a',
warning: '#f4a261',
danger: '#e76f51',
},
},
},
}
Design Tokens (JSON)
{
"color": {
"primary": { "value": "#264653", "type": "color" },
"secondary": { "value": "#2a9d8f", "type": "color" },
"accent": { "value": "#e9c46a", "type": "color" },
"warning": { "value": "#f4a261", "type": "color" },
"danger": { "value": "#e76f51", "type": "color" }
}
}
HEX List
#264653
#2a9d8f
#e9c46a
#f4a261
#e76f51
RGB
rgb(38, 70, 83)
rgb(42, 157, 143)
rgb(233, 196, 106)
rgb(244, 162, 97)
rgb(231, 111, 81)
HSL
hsl(195, 37%, 24%)
hsl(173, 58%, 39%)
hsl(43, 74%, 66%)
hsl(27, 87%, 67%)
hsl(12, 76%, 61%)
from-image
Extract dominant colors from an image.
Parameters:
- Positional: path to image file
--count <N> — Number of dominant colors to extract. Default: 5
Process:
- Read the image file
- If the platform supports image analysis (multimodal), analyze the image directly to identify dominant colors
- Report extracted palette with approximate HEX values
- Optionally run analysis on the extracted palette
Note: Accuracy depends on the AI model's visual capabilities. For pixel-perfect extraction, recommend external tools like imagemagick or colorthief.
suggest
Suggest palettes based on project type, mood, or industry.
Parameters:
--industry <name> — Industry vertical (healthcare, fintech, education, food, fashion, tech, legal, nonprofit)
--style <name> — Visual style (modern, classic, bold, minimal, organic, retro)
--mood <name> — Desired mood (trustworthy, energetic, calm, luxurious, playful, professional)
--accessibility <level> — Required WCAG level (A, AA, AAA)
--count <N> — Number of suggestions. Default: 3
Process:
- Research industry color conventions:
| Industry |
Common Palettes |
Reasoning |
| Healthcare |
Blues, greens, whites |
Trust, cleanliness, calm |
| Fintech |
Navy, teal, gold accents |
Trust, stability, premium |
| Education |
Bright primaries, warm accents |
Energy, approachability |
| Food |
Warm reds, oranges, greens |
Appetite, freshness |
| Fashion |
Black, white, bold accent |
Sophistication, contrast |
| Tech |
Blues, purples, gradients |
Innovation, reliability |
| Legal |
Navy, burgundy, gold |
Authority, tradition |
| Nonprofit |
Greens, earth tones, warm hues |
Growth, community |
- Apply style modifiers (modern = cleaner tones, retro = muted/dusty, bold = high saturation)
- Apply mood adjustments
- Verify accessibility compliance if level specified
- Generate 3 distinct options with rationale
Output:
Palette Suggestions: Healthcare + Modern + AA
Option 1: "Clinical Trust"
#1B4965 ██████ Deep Teal
#5FA8D3 ██████ Sky Blue
#BEE9E8 ██████ Mint Wash
#62B6CB ██████ Ocean
#CAE9FF ██████ Ice Blue
Rationale: Classic healthcare blues with modern teal anchor.
AA compliant: Yes (all text pairs meet 4.5:1)
Option 2: "Wellness Green"
#2D6A4F ██████ Forest
#40916C ██████ Sage
#74C69D ██████ Mint
#B7E4C7 ██████ Seafoam
#D8F3DC ██████ Whisper Green
Rationale: Nature-forward palette conveying growth and wellness.
AA compliant: Yes (dark-on-light pairs meet 4.5:1)
Option 3: "Modern Care"
#2B2D42 ██████ Charcoal
#8D99AE ██████ Cool Gray
#EDF2F4 ██████ Snow
#EF233C ██████ Alert Red
#D90429 ██████ Emergency
Rationale: High-contrast modern palette with clear alert hierarchy.
AA compliant: Yes (strong contrast ratios)
Color Theory Reference
Harmony Models
The color wheel is divided into 360 degrees of hue. Harmony models define mathematical relationships between hues:
- Complementary (180 degrees): Maximum contrast, vibrant when used together
- Analogous (30 degrees): Harmonious, found in nature, low contrast
- Triadic (120 degrees): Balanced, vibrant even at low saturation
- Split-complementary (150/210 degrees): Contrast with less tension than complementary
- Tetradic (90 degree intervals): Rich palette, works best with one dominant color
- Monochromatic (single hue): Unified, elegant, relies on value/saturation contrast
Color Psychology
| Color Family |
Associations |
Common Uses |
| Red |
Energy, urgency, passion, danger |
CTAs, errors, food brands |
| Orange |
Creativity, enthusiasm, warmth |
Accents, notifications, food |
| Yellow |
Optimism, attention, caution |
Highlights, warnings |
| Green |
Growth, health, nature, money |
Success states, eco brands |
| Blue |
Trust, calm, professionalism |
Corporate, tech, healthcare |
| Purple |
Luxury, creativity, mystery |
Premium brands, creative tools |
| Pink |
Playfulness, compassion, romance |
Fashion, beauty, youth brands |
| Brown |
Stability, earthiness, warmth |
Organic brands, vintage |
| Black |
Sophistication, power, elegance |
Luxury, fashion, typography |
| White |
Cleanliness, simplicity, space |
Backgrounds, minimalism |
| Gray |
Neutrality, balance, professionalism |
UI surfaces, text |
Contrast Ratio Calculation
The WCAG 2.1 contrast ratio formula:
Relative luminance L = 0.2126 * R + 0.7152 * G + 0.0722 * B
(where R, G, B are linearized: value <= 0.04045 ? value/12.92 : ((value+0.055)/1.055)^2.4)
Contrast ratio = (L1 + 0.05) / (L2 + 0.05)
(where L1 is the lighter color's luminance, L2 is the darker)
Temperature
- Warm: Hues 0-60 and 300-360 (reds, oranges, yellows, magentas)
- Cool: Hues 120-270 (greens, blues, purples)
- Neutral: Hues 60-120 and 270-300 (yellow-greens, violet transitions), or desaturated colors
Terminal Visualization
When displaying palettes in the terminal, use ANSI 24-bit color escape sequences for color blocks:
\033[48;2;R;G;Bm \033[0m # Background color block
Display format:
#RRGGBB ██████ Color Name (H:xxx S:xx% L:xx%)
If the terminal does not support 24-bit color, fall back to the closest 256-color or 16-color ANSI code.
Light/Dark Mode Variants
When generating light/dark mode variants:
Light mode (from a base palette):
- Background: lightest color or white
- Surface: second-lightest or tinted white
- Text: darkest color or near-black
- Primary: mid-range saturated color
- Accent: most vibrant color
Dark mode (from a base palette):
- Background: darkest color or near-black
- Surface: slightly lighter than background
- Text: lightest color or near-white
- Primary: lighter/more saturated variant of light-mode primary
- Accent: same hue, increased lightness for visibility
Ensure all text/background pairs meet WCAG AA (4.5:1) in both modes.
1---2name: color-palette3description: Generate, analyze, compare, export, and suggest color palettes using color theory. Use when user asks about colors, palettes, color schemes, or needs help choosing colors for a project.4---56# Color Palette Skill78## Purpose910Provide comprehensive color palette tooling: generate palettes from seed colors, analyze existing palettes, compare options, export to development formats, and suggest palettes based on project context.1112## When This Skill Applies1314- User asks to "generate a color palette" or "pick colors"15- User provides a color and wants complementary/matching colors16- User asks to "analyze this palette" or "check these colors"17- User wants to export colors to CSS, Tailwind, or design tokens18- User asks to compare two palettes19- User needs color suggestions for a project type or mood20- User wants to extract colors from an image2122## Trigger Phrases2324| Natural Language | Action |25|------------------|--------|26| "Generate a palette from #3498db" | Generate palette with seed color |27| "What colors go with forest green?" | Generate complementary/harmony palettes |28| "Analyze this palette: #1a1a2e, #e94560" | Run harmony + contrast + mood analysis |29| "Compare these two palettes" | Side-by-side comparison |30| "Export my palette as Tailwind config" | Format conversion |31| "Suggest colors for a fintech app" | Industry-aware suggestion |32| "Extract colors from this image" | Dominant color extraction |33| "I need a dark mode version of this palette" | Light/dark variant generation |3435## Subcommands3637### generate3839Generate a palette from a seed color, mood, or theme.4041**Parameters**:42- `--seed <color>` — Starting color (HEX, RGB, or HSL)43- `--harmony <model>` — Harmony model (complementary, analogous, triadic, split-complementary, tetradic, monochromatic). Default: analogous44- `--count <N>` — Number of colors to generate. Default: 545- `--mood <text>` — Mood descriptor (professional, playful, calm, energetic, luxurious, natural)46- `--temperature <warm|cool|neutral>` — Color temperature bias4748**Process**:49501. Parse the seed color into HSL for manipulation512. Apply the selected harmony model:5253| Model | Algorithm |54|-------|-----------|55| Complementary | Seed + (hue + 180 degrees) |56| Analogous | Seed + (hue +/- 30 degrees) |57| Triadic | Seed + (hue + 120) + (hue + 240) |58| Split-complementary | Seed + (hue + 150) + (hue + 210) |59| Tetradic | Seed + (hue + 90) + (hue + 180) + (hue + 270) |60| Monochromatic | Seed at varied lightness (20%, 40%, 60%, 80%) and saturation |61623. Adjust for mood if specified:63 - Professional: reduce saturation 10-20%, medium lightness64 - Playful: increase saturation 10-20%, varied lightness65 - Calm: reduce saturation 20-30%, shift toward blue/green hues66 - Energetic: increase saturation, shift toward warm hues67 - Luxurious: deep tones, add gold (#C9A96E) or dark accent68 - Natural: earth tones, greens, warm browns69704. Generate tints and shades to fill count if needed715. Output the palette with visualization7273**Output Format**:7475```76Palette: Triadic from #2D5A277778 #2D5A27 ██████ Forest Green (H:113 S:37% L:25%)79 #27355A ██████ Navy Shadow (H:220 S:37% L:25%)80 #5A2735 ██████ Burgundy Dark (H:347 S:37% L:25%)81 #4A8A3F ██████ Leaf Green (H:113 S:37% L:39%) [tint]82 #3F558A ██████ Steel Blue (H:220 S:37% L:39%) [tint]8384Harmony: Triadic (120 degree separation)85Temperature: Cool-neutral86Mood: Natural, grounded, trustworthy87```8889### analyze9091Analyze an existing palette for harmony, contrast, accessibility, and mood.9293**Parameters**:94- `--palette <colors>` — Comma-separated color values9596**Process**:97981. Parse all colors into HEX, RGB, and HSL992. Identify the closest harmony model1003. Calculate all pairwise contrast ratios (WCAG formula)1014. Determine color temperature (average hue warmth)1025. Assess color psychology associations1036. Score overall palette coherence104105**Output**: Uses `templates/palette-report.md` template.106107### compare108109Compare two or more palettes side-by-side.110111**Parameters**:112- `--a <colors>` — First palette113- `--b <colors>` — Second palette114- `--criteria <list>` — What to compare (harmony, contrast, accessibility, mood, temperature). Default: all115116**Output**:117118```119Palette Comparison120121 Palette A Palette B122Colors: #264653,#2a9d8f,... #1a1a2e,#16213e,...123Harmony: Analogous Monochromatic124Temperature: Cool Cool125Mood: Calm, trustworthy Dark, mysterious126WCAG AA: 4/6 pairs pass 3/6 pairs pass127Avg Contrast: 5.2:1 4.1:1128Winner: ← Better accessibility → Stronger mood coherence129```130131### export132133Export palette in a target development format.134135**Parameters**:136- `--palette <colors>` — Colors to export137- `--format <fmt>` — Target format: hex, rgb, hsl, css, tailwind, tokens138- `--names <list>` — Optional semantic names (primary, secondary, accent, etc.)139140**Output by format**:141142#### CSS Custom Properties143```css144:root {145 --color-primary: #264653;146 --color-secondary: #2a9d8f;147 --color-accent: #e9c46a;148 --color-warning: #f4a261;149 --color-danger: #e76f51;150}151```152153#### Tailwind Config154```js155module.exports = {156 theme: {157 extend: {158 colors: {159 primary: '#264653',160 secondary: '#2a9d8f',161 accent: '#e9c46a',162 warning: '#f4a261',163 danger: '#e76f51',164 },165 },166 },167}168```169170#### Design Tokens (JSON)171```json172{173 "color": {174 "primary": { "value": "#264653", "type": "color" },175 "secondary": { "value": "#2a9d8f", "type": "color" },176 "accent": { "value": "#e9c46a", "type": "color" },177 "warning": { "value": "#f4a261", "type": "color" },178 "danger": { "value": "#e76f51", "type": "color" }179 }180}181```182183#### HEX List184```185#264653186#2a9d8f187#e9c46a188#f4a261189#e76f51190```191192#### RGB193```194rgb(38, 70, 83)195rgb(42, 157, 143)196rgb(233, 196, 106)197rgb(244, 162, 97)198rgb(231, 111, 81)199```200201#### HSL202```203hsl(195, 37%, 24%)204hsl(173, 58%, 39%)205hsl(43, 74%, 66%)206hsl(27, 87%, 67%)207hsl(12, 76%, 61%)208```209210### from-image211212Extract dominant colors from an image.213214**Parameters**:215- Positional: path to image file216- `--count <N>` — Number of dominant colors to extract. Default: 5217218**Process**:2192201. Read the image file2212. If the platform supports image analysis (multimodal), analyze the image directly to identify dominant colors2223. Report extracted palette with approximate HEX values2234. Optionally run analysis on the extracted palette224225**Note**: Accuracy depends on the AI model's visual capabilities. For pixel-perfect extraction, recommend external tools like `imagemagick` or `colorthief`.226227### suggest228229Suggest palettes based on project type, mood, or industry.230231**Parameters**:232- `--industry <name>` — Industry vertical (healthcare, fintech, education, food, fashion, tech, legal, nonprofit)233- `--style <name>` — Visual style (modern, classic, bold, minimal, organic, retro)234- `--mood <name>` — Desired mood (trustworthy, energetic, calm, luxurious, playful, professional)235- `--accessibility <level>` — Required WCAG level (A, AA, AAA)236- `--count <N>` — Number of suggestions. Default: 3237238**Process**:2392401. Research industry color conventions:241242| Industry | Common Palettes | Reasoning |243|----------|----------------|-----------|244| Healthcare | Blues, greens, whites | Trust, cleanliness, calm |245| Fintech | Navy, teal, gold accents | Trust, stability, premium |246| Education | Bright primaries, warm accents | Energy, approachability |247| Food | Warm reds, oranges, greens | Appetite, freshness |248| Fashion | Black, white, bold accent | Sophistication, contrast |249| Tech | Blues, purples, gradients | Innovation, reliability |250| Legal | Navy, burgundy, gold | Authority, tradition |251| Nonprofit | Greens, earth tones, warm hues | Growth, community |2522532. Apply style modifiers (modern = cleaner tones, retro = muted/dusty, bold = high saturation)2543. Apply mood adjustments2554. Verify accessibility compliance if level specified2565. Generate 3 distinct options with rationale257258**Output**:259260```261Palette Suggestions: Healthcare + Modern + AA262263Option 1: "Clinical Trust"264 #1B4965 ██████ Deep Teal265 #5FA8D3 ██████ Sky Blue266 #BEE9E8 ██████ Mint Wash267 #62B6CB ██████ Ocean268 #CAE9FF ██████ Ice Blue269 Rationale: Classic healthcare blues with modern teal anchor.270 AA compliant: Yes (all text pairs meet 4.5:1)271272Option 2: "Wellness Green"273 #2D6A4F ██████ Forest274 #40916C ██████ Sage275 #74C69D ██████ Mint276 #B7E4C7 ██████ Seafoam277 #D8F3DC ██████ Whisper Green278 Rationale: Nature-forward palette conveying growth and wellness.279 AA compliant: Yes (dark-on-light pairs meet 4.5:1)280281Option 3: "Modern Care"282 #2B2D42 ██████ Charcoal283 #8D99AE ██████ Cool Gray284 #EDF2F4 ██████ Snow285 #EF233C ██████ Alert Red286 #D90429 ██████ Emergency287 Rationale: High-contrast modern palette with clear alert hierarchy.288 AA compliant: Yes (strong contrast ratios)289```290291## Color Theory Reference292293### Harmony Models294295The color wheel is divided into 360 degrees of hue. Harmony models define mathematical relationships between hues:296297- **Complementary** (180 degrees): Maximum contrast, vibrant when used together298- **Analogous** (30 degrees): Harmonious, found in nature, low contrast299- **Triadic** (120 degrees): Balanced, vibrant even at low saturation300- **Split-complementary** (150/210 degrees): Contrast with less tension than complementary301- **Tetradic** (90 degree intervals): Rich palette, works best with one dominant color302- **Monochromatic** (single hue): Unified, elegant, relies on value/saturation contrast303304### Color Psychology305306| Color Family | Associations | Common Uses |307|-------------|--------------|-------------|308| Red | Energy, urgency, passion, danger | CTAs, errors, food brands |309| Orange | Creativity, enthusiasm, warmth | Accents, notifications, food |310| Yellow | Optimism, attention, caution | Highlights, warnings |311| Green | Growth, health, nature, money | Success states, eco brands |312| Blue | Trust, calm, professionalism | Corporate, tech, healthcare |313| Purple | Luxury, creativity, mystery | Premium brands, creative tools |314| Pink | Playfulness, compassion, romance | Fashion, beauty, youth brands |315| Brown | Stability, earthiness, warmth | Organic brands, vintage |316| Black | Sophistication, power, elegance | Luxury, fashion, typography |317| White | Cleanliness, simplicity, space | Backgrounds, minimalism |318| Gray | Neutrality, balance, professionalism | UI surfaces, text |319320### Contrast Ratio Calculation321322The WCAG 2.1 contrast ratio formula:323324```325Relative luminance L = 0.2126 * R + 0.7152 * G + 0.0722 * B326(where R, G, B are linearized: value <= 0.04045 ? value/12.92 : ((value+0.055)/1.055)^2.4)327328Contrast ratio = (L1 + 0.05) / (L2 + 0.05)329(where L1 is the lighter color's luminance, L2 is the darker)330```331332### Temperature333334- **Warm**: Hues 0-60 and 300-360 (reds, oranges, yellows, magentas)335- **Cool**: Hues 120-270 (greens, blues, purples)336- **Neutral**: Hues 60-120 and 270-300 (yellow-greens, violet transitions), or desaturated colors337338## Terminal Visualization339340When displaying palettes in the terminal, use ANSI 24-bit color escape sequences for color blocks:341342```343\033[48;2;R;G;Bm \033[0m # Background color block344```345346Display format:347```348#RRGGBB ██████ Color Name (H:xxx S:xx% L:xx%)349```350351If the terminal does not support 24-bit color, fall back to the closest 256-color or 16-color ANSI code.352353## Light/Dark Mode Variants354355When generating light/dark mode variants:356357**Light mode** (from a base palette):358- Background: lightest color or white359- Surface: second-lightest or tinted white360- Text: darkest color or near-black361- Primary: mid-range saturated color362- Accent: most vibrant color363364**Dark mode** (from a base palette):365- Background: darkest color or near-black366- Surface: slightly lighter than background367- Text: lightest color or near-white368- Primary: lighter/more saturated variant of light-mode primary369- Accent: same hue, increased lightness for visibility370371Ensure all text/background pairs meet WCAG AA (4.5:1) in both modes.