Design

Palette Extractor

Pull dominant colors from any reference image: the image is sampled in a downscaled canvas, colors are quantized and ranked by frequency, then a diversity filter keeps swatches from clustering. Export CSS custom properties or JSON — all locally in your browser.

Ad placement — top banner
Drop image here or browse — PNG, JPG, WEBP, SVG
No image selected

Quantization merges similar RGB values before counting. Larger buckets favor broader theme colors; smaller buckets retain more variation.

Source preview
Swatches

Click a swatch to copy its HEX.

/* Upload an image to begin */
[]
Ad placement — mid rectangle

What this palette extractor does

It resizes your image (long edge about 220px for sampling), reads pixels from a canvas, then buckets RGB values using the quantization step you chose. Each bucket counts how many pixels landed there. The most frequent buckets become candidates; a minimum distance filter in RGB space keeps the final swatches from sitting on top of each other.

Quantization and diversity

Fine quantization (small buckets) preserves subtle differences — good for gradients and photographs. Coarse buckets merge nearby shades so you see broader “theme” colors. If two swatches still look alike, reduce the swatch count or increase bucket size.

Transparency

Pixels with alpha below a small threshold are skipped so transparent PNGs and cutouts do not dominate the counts with “empty” color.

Privacy

Your image is never uploaded to DroidXP — decoding and sampling happen with canvas and getImageData in your browser.

How to use this tool

  1. Step 1: Upload a reference image (PNG, JPG, WebP, or SVG).
  2. Step 2: Choose swatch count and quantization; use Extract again after tweaking.
  3. Step 3: Copy individual HEX values, or paste the CSS variables / JSON into your design system or code.

Frequently Asked Questions

Does DroidXP upload my image?

No. The file is decoded in your browser; pixel data stays on your device.

Is this the same as a brand color picker?

It uses frequency and simple heuristics — not a full brand-asset pipeline. For production, validate with your brand guidelines and accessibility tools.

Why do results change when I change quantization?

Bucket size changes which RGB values merge before counting, so the top-ranked colors can shift.

Why are some swatches similar?

Photos often contain noise and gradients. Try fewer swatches, coarser quantization, or crop the image to the region you care about.

Are transparent pixels counted?

Very transparent pixels are ignored so they do not skew the palette.

Can I use the output in Tailwind or Figma?

Copy HEX or JSON and map manually into tokens or styles — this tool does not emit framework config files.

Does this work for huge images?

Sampling uses a downscaled copy for speed. For detail, crop the important area first in an editor.

What about CMYK or print profiles?

Browsers render in sRGB. For print, verify colors in your DTP software with the correct ICC profile.

Is WCAG contrast checked here?

No. Use a contrast checker when pairing text and background colors for accessibility.