Colors from Image

Extract the dominant colors of a photo or logo as a palette – with share, hex codes and export, right in the browser without uploading.

Runs locally in your browser
Drop, paste or choose an imagePNG, JPEG, WebP, GIF, SVG … – the image stays on your device

About this tool

Which colors are in a photo, a logo or a screenshot? The tool determines the main colors of an image and shows them as a palette with hex codes and their share of the image. Ideal for designing a website to match a header image, taking brand colors from a logo or getting inspiration from nature photos.

The analysis runs entirely in your browser: the image is scaled down, split into color groups and refined with the k-means method. From each color found you can create a whole palette including shades in the Color Palette Generator with one click; formats such as RGB or HSL come from the Color Converter & Contrast Checker.

How it works

  1. Drag an image into the field, paste it with Ctrl+V or choose a file.
  2. Set how many colors should be found (2 to 12).
  3. Copy single hex codes or all colors as CSS variables.
  4. Create a complete palette from a color if needed.

Frequently asked questions

How are the colors determined?

The pixels are repeatedly split into groups along the color axis with the largest spread (similar to the median cut method). The groups are then refined with a few k-means rounds. Each color is the average of its group; the share says how many pixels belong to it.

Why does a color not match a pixel exactly?

Because averages of whole areas are calculated. For photos with gradients that is intended – it produces a harmonious palette. For exact values of flat areas, e.g. in logos, choose more colors.

Is my image uploaded?

No. The image is only read and analysed in your browser. It never leaves your device.

What happens to transparent areas?

Pixels that are mostly transparent are ignored. For logos with a transparent background only the visible colors appear.