Extract a color palette from any photograph
Upload a photo and the tool analyzes the pixel data to identify the 5 to 10 most dominant colors. Each swatch displays its HEX, RGB, and HSL values, ready to copy into your design tool, CSS file, or brand style guide. Adjust the number of colors and fine-tune individual swatches before exporting.
Use this tool freeFeatures
Dominant color extraction
A k-means clustering algorithm analyzes every pixel in the image and groups them into 5 to 10 dominant color clusters. The result is a palette that accurately represents the visual mood of the photo.
Multiple color formats
Each swatch shows HEX, RGB, and HSL values. Click any value to copy it to the clipboard. Toggle between formats depending on whether you work in CSS, design tools, or print specifications.
Adjustable palette size
Use the slider to generate anywhere from 5 to 10 color swatches. Fewer colors produce a bolder, more simplified palette; more colors capture subtle gradients and accent tones.
Export options
Download the palette as a PNG swatch card, a CSS custom-properties file, an Adobe ASE swatch file, or a plain JSON array. Each format is ready to import directly into your workflow.
How to use
Upload a photo
Drag a JPEG, PNG, or WebP file into the tool. Landscape, portrait, and square images all work — the algorithm samples the entire canvas.
Set palette size
Move the slider to choose between 5 and 10 colors. The palette regenerates in real time as you adjust.
Copy or refine colors
Click any swatch to copy its HEX code. To fine-tune, click the edit icon on a swatch to open the color picker and shift the hue, saturation, or lightness.
Export
Download the palette as a PNG swatch card, CSS variables file, Adobe ASE file, or JSON array. Use the format that fits your design or development workflow.
Specifications
| Palette range | 5–10 colors |
| Color formats | HEX, RGB, HSL |
| Export formats | PNG, CSS, ASE, JSON |
| Algorithm | K-means pixel clustering |
| Input formats | JPEG, PNG, WebP |
| Processing | Client-side (no upload) |
Related Magic Eraser Tools
Common questions
How does the tool decide which colors are 'dominant'?
+
The tool uses k-means clustering, which groups all pixels in the image by color similarity and calculates the average color of each cluster. Larger clusters — representing more pixels — rank higher, so the palette reflects the colors that cover the most visual area.
Can I use the extracted colors for my brand style guide?
+
Absolutely. Copy the HEX or RGB codes directly into your style guide. The ASE export also lets you import the palette into Adobe Illustrator, Photoshop, or InDesign as native swatches.
What type of photo produces the best palette?
+
Photos with distinct color regions — sunsets, food photography, fashion flatlays — produce the most vibrant and useful palettes. Low-contrast or monochromatic images will yield swatches that are very similar to each other.
Photo colors looking flat?
AI Enhance can boost color vibrancy and correct white balance before you extract the palette. Richer source colors lead to a more dynamic and usable swatch set.
Try it freeMore free tools
Explore our other limited free edits after sign-in photo and image tools.
Resize images to exact pixel dimensions for social media, web, and print. Sign-in required for free edits. Supports JPEG, PNG, and WebP up to 50 MB.
Compress JPEG, PNG, and WebP images by up to 80 % with minimal visible quality loss. Adjust the quality slider for full control. Sign-in required for free edits.
Convert PNG images to JPEG format instantly. Adjust output quality, pick a background color for transparent areas, and download — sign-in required.
Convert JPEG images to PNG format for lossless quality and transparency support. Ideal before background removal. Sign-in required; no install required.
Convert Apple HEIC and HEIF photos to universally compatible JPEG format. Works in the browser — no app install, sign-in required, no file uploads to a server.
Convert JPEG and PNG to WebP for faster page loads, or convert WebP back to JPEG/PNG for compatibility. Sign-in required, no install, runs in the browser.