Drop your image here

or click to browse — JPG, PNG, WebP supported

JPG PNG WebP
Preview
Extracted Palette — click any swatch to copy HEX
Number of Colors
8
Sort By
CSS Variables — paste into your stylesheet

About This Tool

How to Extract a Color Palette

  1. 1Drop or select any image — a photograph, logo, illustration, or design screenshot all work well.
  2. 2The tool analyzes pixel data and identifies the most dominant colors using a clustering algorithm, outputting a palette of 5–10 representative colors.
  3. 3Each color is displayed with its HEX, RGB, and HSL values. Click any swatch to copy the HEX code instantly.
  4. 4Download the full palette as a PNG swatch sheet or copy individual values for use in CSS, design files, or brand guidelines.

When to Extract a Color Palette

Brand Color Development
Extract colors from a logo, product, or mood board image to build a consistent color system for a brand. Faster and more accurate than eyeballing swatches manually.
Design Inspiration
Pull palettes from photographs, artworks, or screenshots of sites you admire to use as a color foundation for a new design project. Pairs naturally with our Color Picker for sampling individual pixels.
CSS & Web Development
Extract the dominant colors from a client's hero image to inform the CSS color scheme of a website — ensuring the UI palette is harmonious with the photography.
Print & Marketing Materials
Ensure brand consistency across print by extracting exact HEX values from digital assets before specifying Pantone or CMYK equivalents to a print vendor.

Why Extract Palettes in the Browser

Color palette extraction runs entirely on pixel data — there's no reason for your image to leave your device. This tool performs the analysis locally using the Canvas API with no upload. For sampling an individual specific pixel rather than extracting the dominant palette, our Color Picker is the right tool. For a full overview of design-focused browser tools, see our roundup of 175+ free browser-based tools for images, PDFs, SEO, and development.

Frequently Asked Questions

The tool samples pixels from your image and groups similar colours together using a median-cut algorithm. This divides the colour space recursively, separating pixels into buckets of similar hues until the desired number of colours is reached. Each bucket is then averaged to produce a single representative colour. This approach finds the most visually significant colours rather than just the most frequently occurring ones.

The CSS output exports your palette as --color-1 through --color-N custom properties inside a :root block. Paste this into your stylesheet and reference the colours anywhere with var(--color-1). This is useful for building a consistent colour system from an existing image — for example, matching a website’s palette to a product photo or brand image.

For most images, 6–8 colours captures the dominant palette well. Fewer colours (2–4) gives you the most impactful accent colours but may miss secondary tones. More colours (10–12) reveals subtle variations in shadows and highlights. Photos with lots of gradients or similar tones benefit from more colours; images with a small number of flat colours need fewer.

Dominance sorts by how many pixels each colour represents — the most common colours appear first.

Brightness sorts from darkest to lightest, which is useful for seeing your palette as a tonal scale from shadow to highlight.

Hue sorts by colour wheel position (red → orange → yellow → green → blue → purple), great for seeing the rainbow distribution of your image.

The downloaded PNG shows each colour as a tall swatch with its HEX code, RGB values, and a colour name label. The palette is 1200px wide and sized to fit all swatches, making it easy to share with design teams, clients, or save as a reference file. The background is white so it prints cleanly and works in presentations.