EN
My tools

Color Palette from Image

Find the main colours of a photo or logo: HEX, RGB, HSL and share of each, average colour, a palette PNG, CSS variables and Tailwind code. No upload.

Each image gets its own palette.
My tools →
Advertisement

A palette pulled from a photo or logo is the fastest way to match a website, slide deck or brand kit to an image. This tool groups similar pixels and reports the main colours with their HEX, RGB and HSL values and how much of the image each one covers. You also get a palette image, CSS custom properties and a Tailwind snippet ready to paste. The analysis runs in your browser; the image is never uploaded.

How to use this tool

  1. Choose one or more images.
  2. Set how many colours you want (2–16).
  3. Pick the method: k-means for photos, median cut for a quick result.
  4. For logos and flat graphics, choose “Most common exact pixel colour” to get the precise brand colours.
  5. Copy the HEX codes, CSS or Tailwind code, or download the palette PNG.

Formula

ΔE = √((L₁ − L₂)² + (a₁ − a₂)² + (b₁ − b₂)²) in CIE Lab; share = pixels in the group ÷ pixels counted

k-means places k centres with k-means++ seeding (weighted by how often each colour occurs) and then repeats “assign every colour to the nearest centre, move each centre to the mean of its group” up to 20 times. Distances are measured in Lab, where equal distances look roughly equally different to the eye. Median cut instead keeps splitting the box of colours with the widest red, green or blue range at its weighted median. Transparent pixels (alpha under 50%) are skipped when that option is on.

Example

A 120 × 80 logo with a blue (#2563EB) background and a yellow (#FBBF24) circle of radius 25 px: the circle covers π × 25² ≈ 1,964 of 9,600 pixels. With 2 colours and exact values the tool reports #2563EB at about 79.5% and #FBBF24 at about 20.5%.

Frequently asked questions

Why does the average colour look grey or brown?

It is the mean of every pixel, so strong colours cancel each other out. Use the palette colours for design work; the average is useful for placeholders or a background tint behind the image.

Why are the HEX codes slightly different from my logo file?

With “Average of the group”, anti-aliased edges and compression noise pull the mean a little. Choose “Most common exact pixel colour” to report the precise colour that appears most often.

Should I ignore white?

Turn it on for product photos or scans on white backgrounds, so the paper does not take up a palette slot. Leave it off if white is part of the design.

Is the result the same every time?

Yes. The k-means seeding uses a fixed random seed, so the same image and settings always give the same palette.

Last updated:

Cite or embed this tool
APA

kakaoCalc. (2026, November 8). Color Palette from Image. https://kakao.mobile/tools/image-palette-extractor/

MLA

“Color Palette from Image.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/image-palette-extractor/.

Advertisement