---
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

```bash
# Basic usage
python script.py image.png

# Get 8 colors as hex values
python script.py image.jpg -n 8 -f hex

# JSON output for programmatic use
python script.py image.png --json

# Just the dominant color
python script.py image.png --dominant-only -f hex
```

## Instructions

1. Run the script with the image path provided by the user: `$ARGUMENTS`
2. Present the extracted colors clearly
3. If the user needs the colors for code, offer to format them as CSS variables, Tailwind config, or other formats
