| name | dominant-color |
| description | Extract dominant colors from an image. Use when the user wants to find the main colors in an image or generate a color palette. |
| argument-hint | <image-path> [options] |
| allowed-tools | Bash(python *), Read |
Dominant Color Extraction
Extract dominant colors from an image file using the extract_colors.py script.
Script Usage
python ~/.claude/skills/dominant-color/scripts/extract_colors.py <image> [options]
Options
| Flag | Description |
|---|
-n, --count N | Number of colors to extract (default: 5) |
-q, --quality 1-10 | Extraction quality, 1=best (default: 1) |
-f, --format FORMAT | Output format: hex, rgb, tuple, full |
--json | Output as JSON |
--dominant-only | Only output the dominant color |
Examples
python script.py image.png
python script.py image.jpg -n 8 -f hex
python script.py image.png --json
python script.py image.png --dominant-only -f hex
Instructions
- Run the script with the image path provided by the user:
$ARGUMENTS
- Present the extracted colors clearly
- If the user needs the colors for code, offer to format them as CSS variables, Tailwind config, or other formats