get_dominant_colors
Extract the dominant colors from an image using K-means clustering. Returns exact hex codes and percentages for each color.
Instructions
Extract the dominant colors from an image.
Uses K-means clustering to find the most prominent colors. Returns exact hex codes and percentages.
Args: image_path: Path to the image num_colors: Number of colors to return (1-5)
Returns: List of hex codes with percentages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image_path | Yes | ||
| num_colors | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |