Docuboxer

Color Palette Extractor

Pull the dominant colors out of an image and export them to CSS or Tailwind.

100% local — your files are never uploaded to any serverNo signupWorks offline

How do you extract a color palette from an image?

Docuboxer's color palette extractor reads every pixel of an image with a k-means clustering algorithm that runs entirely in your browser: upload a photo or design, pick how many colors you want — from 3 to 10 — and within seconds you get the dominant colors as HEX, RGB and HSL, each one's share of the image, and whether white or black text meets the minimum WCAG AA/AAA contrast on that background. It's the fastest image color picker for pulling colors out of a photo without opening an editor: drop the image in, copy the HEX you need, or export the whole palette as CSS variables, a Tailwind config, JSON or a plain-text HEX list. The dominant color is flagged separately. Everything runs locally — the image is never uploaded anywhere — and it's completely free, with no signup and no usage limit.

How to use Color Palette Extractor

  1. Drag your image in or click to select it — JPG, PNG, WebP and GIF up to 50 MB are supported.
  2. Adjust how many colors to extract with the slider, from 3 to 10.
  3. Check each color in the palette: its HEX, RGB, HSL, share of the image, and whether it passes WCAG contrast with white or black text.
  4. Copy any color with one click, or export the full palette as CSS variables, a Tailwind config, JSON or a HEX list.

Common use cases

Pulling brand colors from a photo

Analyze a logo or product photo to identify a brand's exact colors when you don't have the style guide handy.

Building a website palette from a mood board

Upload a reference or inspiration image and turn its dominant colors straight into CSS variables or a Tailwind config for your project.

Putting together consistent moodboards

Pull the palette from several reference photos to assemble a moodboard with a consistent color story before starting a design.

Checking accessibility before using a photo as a background

Verify whether white or black text passes WCAG AA or AAA contrast on each color of a photo before using it as a section background.

Picking complementary colors for a design

Extract a palette from an inspiration image, then take those HEX codes into Docuboxer's color converter to build complementary or analogous palettes.

Frequently asked questions

How do I extract a color palette from an image online?

Upload the image, adjust the number of colors with the slider, and the palette appears instantly with each color's HEX, RGB and HSL — ready to copy or export.

How many colors can I pull from a photo?

Between 3 and 10 dominant colors, depending on how much detail you need: fewer colors give a simplified palette, more colors capture subtler shades.

How do I know which is the image's dominant color?

The first color in the list, marked "Dominant", is the one with the largest share of the image.

What export formats are supported?

You can export the palette as CSS variables, a Tailwind config, JSON, or a plain-text list of HEX codes — whatever fits your project.

Is my image uploaded to a server?

No. The whole analysis, from reading pixels to clustering by color, happens in your browser with JavaScript. The image never leaves your device.

Why does the WCAG contrast of each color matter?

It tells you, before you start building, whether white or black text stays readable on that background color under the AA and AAA accessibility levels — so you don't have to fix it later.