Color Palette Extractor Online: Colors from Images
Extract dominant color palettes from any photo or image. Copy HEX, RGB, or HSL codes, and export CSS variables, Tailwind palettes, or JSON instantly.
100% private. Nothing is uploaded.
How to Extract a Color Palette from an Image
Upload Image
Press Choose Image or drag a JPG, PNG, WebP, GIF, BMP or SVG file onto the page.
View Colors
A palette of up to 8 colors appears. Pick 4, 6, 10 or 12 under Colors to change it.
Copy & Export
Click a swatch or code to copy it, or export CSS variables, Tailwind, JSON or a PNG.
Key features

4 to 12 Colors per Palette

HEX, RGB & HSL Values
- Files Stay on Your Device
- Free Online Tool
- No Registration Required
- CSS & Tailwind Export
What Can You Do with Extracted Color Palettes?
Web & App Design
- Start color tokens for a design system
- Export CSS variables or a Tailwind config
- Match a website theme to its hero photo
- Pick a UI color scheme from a mood photo
Branding & Identity
- See the main colors of a logo or product shot
- Build mood boards from reference photos
- Keep colors close across a set of brand images
- Share a palette as a PNG strip or JSON
Art & Photography
- Study the colors in a painting or illustration
- Pull a palette from a photo of a famous artwork
- Make color studies from nature photos
- Start a palette for a digital illustration
What Is a Color Palette Extractor?
A color palette extractor finds the main colors in a picture and shows them as a row of swatches, each with a color code. It looks at the whole image at once. A color picker is different: it gives you the exact color of the one spot you click.
How to Get a Color Palette from an Image
Drop a photo on the tool and a palette of up to 8 colors appears. These answers help you pick the right number of colors and the right image, and show what each swatch stands for.
How Many Colors Should a Palette Have?
Pick 4, 6, 8, 10 or 12 under Colors, just above the swatches. The palette is rebuilt from the same image each time. As a rough guide:
- 4 colors: a simple scheme, or a logo with only a few colors.
- 6 to 8 colors: most photos. 8 is the default.
- 10 to 12 colors: busy photos and paintings, when you want more shades.
How Does the Extractor Pick the Colors?
It uses a method called median cut. The tool sorts the pixels into groups of similar colors. It keeps splitting the group with the widest range of colors in half until it has as many groups as you asked for. Each swatch is the average color of one group.
- Swatches are in order of how many pixels they stand for, biggest group first.
- Colors that cover less than about 0.5% of the image are left out, so you can get fewer swatches than you picked.
- Pixels that are mostly see-through are skipped, so a clear PNG background doesn't become a swatch.
Which Images Give the Best Palette?
Photos with a few clear areas of color give the cleanest palette. A few tips:
- If one part matters most, such as a product or a painted wall, crop the image to that part first.
- Large plain areas, like sky or a white background, get swatches of their own.
- A logo with 2 or 3 colors works best at 4 colors. At higher counts, some swatches can repeat a color or show a blend of two.
- An animated GIF gives the palette of its first frame.
Palette or Single Color: Which Do You Need?
Use the palette to see the overall color scheme of an image. Each swatch is an average, so it may not match any single pixel exactly. For the exact code of one spot, such as a brand color in a logo, use the color picker from image and click that spot.
More Free Tools
Check out our other free image and design tools — no sign up required.
Resize Image
Resize images to exact dimensions or percentage while maintaining quality.
Compress Image
Reduce file size without visible quality loss for web and sharing.
Image Metadata Viewer
View EXIF data, GPS location, DPI, and camera settings of any image.
QR Code Generator
Generate QR codes from URLs, text, WiFi, or contacts with custom colors.
Color Picker from Image
Click one spot in a photo or screenshot to get its exact HEX, RGB and HSL code.
Color Palette Extractor FAQ
Common questions about extracting, using, and exporting color palettes from images.
How do I get a color palette from an image?
Press Choose Image, or drag a JPG, PNG, WebP, GIF, BMP or SVG file onto the page. A palette of up to 8 colors appears under your image. Pick 4, 6, 10 or 12 under Colors to change it. Then click any swatch or code to copy it, or export the whole palette.
What image formats can I use?
You can open JPG, PNG, WebP, GIF, BMP and SVG files, one image at a time. An SVG logo works too, and its clear background is skipped. An animated GIF uses its first frame. Clear or mostly see-through areas in a PNG, WebP or GIF are skipped, so they don't turn into a swatch.
Can I extract more than 8 colors?
Yes. 8 is the default, and once the first palette shows you can pick 4, 6, 8, 10 or 12 under Colors. The palette is rebuilt from the same image. You can get fewer swatches than you picked, because colors that cover less than about 0.5% of the image are left out.
Can I get the hex codes of the colors in an image?
Yes. Each swatch card shows a HEX, RGB and HSL code, such as #3A7BDF, rgb(58, 123, 223) and hsl(216, 72%, 55%). Click a code to copy it, or click the color itself to copy its HEX code. Each code is the average of a group of pixels. For the exact code of one pixel, use the color picker from image tool.
How do I use the palette in CSS or Tailwind?
Under Export Palette, pick CSS Variables, Tailwind Config or JSON, then press Copy Code. CSS Variables gives a :root block with --color-1, --color-2 and so on, used as var(--color-1). Tailwind Config gives a snippet for tailwind.config.js, so classes like bg-palette-1 work. JSON lists the HEX, RGB and HSL code of each color. Download PNG saves the swatches as an image with their HEX codes.
Why do some extracted colors look different from what I expected?
Each swatch is the average of a group of similar pixels, so it can look a little duller than the brightest spot. Swatches follow how much of the image a color covers, not how eye-catching it is. A small red flower can be left out while a large sky gets two swatches. Crop to the area you care about, or pick a higher color count.
Are my images safe when I extract a palette?
Yes. Your image is read on your own device and is never uploaded, so we never see it. Nothing is saved: the palette is gone when you reload or close the page, unless you copy or download it first.
Is the color palette extractor free?
Yes. There is no account, no sign-up and no limit on how many images you check. Every option is free: all five color counts, copying codes, and the CSS, Tailwind, JSON and PNG exports.