Color Palette Extractor
Pricing
$3.00/month + usage
Go to Apify Store
Color Palette Extractor
Extract dominant colors from images using K-means clustering. Get color palettes in HEX, RGB, and HSL formats with color names and percentages.
Pricing
$3.00/month + usage
Rating
0.0
(0)
Developer

Web Harvester
Maintained by Community
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Share
🎨 Extract dominant colors from images using K-means clustering
What This Actor Does
- Extract dominant colors - Find the most prominent colors in any image
- Multiple formats - Output in HEX, RGB, and HSL color formats
- Color names - Get human-readable color names (e.g., "Navy Blue", "Forest Green")
- Customizable - Control number of colors, quality, and filtering options
- Batch processing - Analyze multiple images at once
Use Cases
| Use Case | Description |
|---|---|
| Brand Analysis | Extract brand colors from logos and marketing materials |
| Design Inspiration | Generate color palettes from photos and artwork |
| E-commerce | Categorize products by color |
| Content Moderation | Detect dominant colors in user-uploaded images |
| Data Visualization | Create color schemes based on image themes |
Input Examples
Basic Usage
{"imageUrls": ["https://example.com/image.jpg"],"colorCount": 5}
High Quality Analysis
{"imageUrls": ["https://example.com/image.jpg"],"colorCount": 8,"quality": "accurate","includeColorNames": true}
Exclude Neutrals
{"imageUrls": ["https://example.com/image.jpg"],"colorCount": 5,"excludeWhite": true,"excludeBlack": true,"minSaturation": 0.2}
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
imageUrls | array | - | URLs to images (required) |
colorCount | integer | 5 | Number of colors to extract (1-20) |
quality | string | "balanced" | fast, balanced, or accurate |
excludeWhite | boolean | false | Exclude near-white colors |
excludeBlack | boolean | false | Exclude near-black colors |
minSaturation | number | 0 | Minimum saturation (0-1) |
outputFormats | array | ["hex","rgb","hsl"] | Color formats to include |
includeColorNames | boolean | true | Include color names |
Output
{"source": "https://example.com/starry-night.jpg","success": true,"colorCount": 5,"dominantColor": "#1a3a5c","palette": [{"percentage": 35.2,"hex": "#1a3a5c","rgb": { "r": 26, "g": 58, "b": 92 },"hsl": { "h": 211, "s": 56, "l": 23 },"name": "Dark Slate Blue"},{"percentage": 22.8,"hex": "#f4d03f","rgb": { "r": 244, "g": 208, "b": 63 },"hsl": { "h": 48, "s": 89, "l": 60 },"name": "Gold"}]}
Quality Settings
| Quality | Resize To | Speed | Accuracy |
|---|---|---|---|
| fast | 100px | Fastest | Good |
| balanced | 200px | Medium | Better |
| accurate | 400px | Slower | Best |
Color Formats
| Format | Example |
|---|---|
| HEX | #1a3a5c |
| RGB | { "r": 26, "g": 58, "b": 92 } |
| HSL | { "h": 211, "s": 56, "l": 23 } |
Cost Estimation
| Scale | Images | Compute Units |
|---|---|---|
| Small | 10 | ~0.001 |
| Medium | 100 | ~0.01 |
| Large | 1000 | ~0.05 |
Technical Details
- Language: Python 3.12
- Libraries: Pillow, scikit-learn, webcolors
- Algorithm: K-means clustering
- Memory: 256MB-512MB
Supported Image Formats
- JPEG / JPG
- PNG
- GIF
- WebP
- BMP
- TIFF
Keywords: color, palette, extract, dominant, kmeans, image, design, hex, rgb, hsl


