Extraction de couleurs dominantes

VérifiéSûr

Extrait les couleurs dominantes d'une image à l'aide d'un script Python. Spécifiez le chemin de l'image et optionnellement le nombre de couleurs, la qualité, le format de sortie (hex, rgb, tuple, full) ou obtenez une sortie JSON. Utile pour le design, la génération de palettes de couleurs ou l'extraction programmatique.

Spar Skills Guide Bot
Data & IADébutant
7002/06/2026
Claude Code
#dominant-color#color-extraction#image-processing#color-palette

Recommandé pour

Notre avis

Extrait les couleurs dominantes d'une image et génère une palette de couleurs.

Points forts

  • Facile à utiliser avec une seule commande
  • Support de plusieurs formats de sortie (hex, rgb, tuple, JSON)
  • Possibilité de choisir le nombre de couleurs et la qualité d'extraction

Limites

  • Nécessite que l'image soit accessible localement
  • La qualité d'extraction dépend de la complexité de l'image
  • Ne gère pas les images distantes
Quand l'utiliser

Lorsque vous avez besoin d'extraire rapidement une palette de couleurs à partir d'une image pour un projet de design ou de développement.

Quand l'éviter

Si vous avez besoin d'une analyse de couleurs avancée avec des algorithmes de segmentation ou de reconnaissance de motifs.

Analyse de sécurité

Sûr
Score qualité90/100

The skill runs a local Python script to extract color information from an image file. It does not involve network access, external commands, or destructive operations. The allowed tools are limited to Bash (python) and Read, which are used in a safe manner.

Aucun point d'attention détecté

Exemples

Extract dominant color from logo
What are the main colors in this logo? /path/to/logo.png
Generate a 6-color palette as hex
Extract 6 dominant colors from this image and show them as hex values: /path/to/photo.jpg
JSON output for programmatic use
Get the dominant colors from this image in JSON format: /path/to/image.png

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

# 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
Skills similaires