vasilenko.info

Image color palette

/en/tool/palette-from-image/ works Eyedropper, seven formats, file export

Provide an image as a file, drag and drop it, paste it from the clipboard, or provide a link or page address — the tool will analyze its pixels and show each color with its share. Click the image with the eyedropper, adjust the palette manually, and download the result as a file.

promoTwenty years of notes on websitesHow we did it in 2008 and what still works today.Open

Image

Five ways to provide an image: choose a file, drag it into the frame, paste it from the clipboard with Ctrl+V, enter an image URL, or enter a page URL—we'll get its og:image from the page.

JPEG, PNG, WebP, or GIF, up to 30 MB. The file stays on your device
Drag an image here or press Ctrl+V to paste it from the clipboard

Your browser first loads the image directly from the other site—this is the fastest option. It can read the image pixels only if that site allows it with a CORS header. Stock photo sites and CDNs usually allow this; random sites usually don't. If it doesn't, our server fetches the same image: the image URL is sent to us, counting as one of the 300 requests the server accepts from one address per hour. It won't fetch images larger than four megabytes—copy and paste those with Ctrl+V.

This URL is sent to our server, which fetches the markup and extracts its og:image—the image the page uses to represent itself on social media. Your browser then tries to fetch it; if the other site doesn't let it, the image comes through us in a second request. The server accepts 300 requests from one address per hour.

Number of colors
Color reduction method

Median cut divides the color cube in half while preserving proportions. k-means finds clusters in Lab and is better at capturing skin and sky tones. Accents return seven named colors—bright, muted, light, dark, dominant, and others; the number of colors does not affect them.

Analysis accuracy

Fast uses a 240 px copy: a small logo or subtle accent may dissolve in that copy and be left out of the palette. Accurate uses the full resolution with a 32×32×32 histogram.

Without this option, a color is the average of a group, and that exact pixel may not exist in the image. With it enabled, every HEX value actually occurs in the image.

A circle for each palette color, placed where that color appears in the image. You can drag a pin: the color is recalculated from the point beneath it and pinned there.

Palette

Primary color

Colors in palette
Method
Image size
Analyzed
Pixels included
Transparent pixels skipped

Analysis runs in your browser, and the file never leaves your device. We send the page URL to our server when you search for an image by page URL, and the image URL only when the other site doesn't let your browser read the image.

Colors individually

The bar is shown above in the panel: the sample width there represents the color's share of the image. Here, the same palette is shown as rows and can be edited: delete an unwanted color, pin a needed one, replace any color with the eyedropper, or reorder them.

Record format

The format applies to the list, copying, and export.

Order

The order is remembered between visits. If you rearrange the rows manually, the order stays manual until you choose an option here again.

Nothing to show yet. Upload an image—or open a link with a ready-made palette.

The link stores the palette itself, not the image. You can share it, and anyone who opens it will see exactly these colors.

Download as a file

Everything is processed on your device and saved directly from the browser—no file is sent anywhere.

For code

Variable names are palette-1…N. Values use the format selected above.

For editors

ASE files open in Photoshop, Illustrator, and InDesign; GPL files open in GIMP, Inkscape, and Krita; sketchpalette files open in Sketch.

As an image

Swatches with labeled values—to attach to an email or task.

Color contrast

Each pair of palette colors is compared against the other according to WCAG. You can immediately see which color can be used as text on which background, and which pairs need more separation.

The matrix will appear when the palette contains at least two colors.

promoCalculate ROI at the same timeCampaign payback based on spend and revenue.Open

How to use it

  1. Provide an image in any of five ways: as a file, by dragging it into the frame, with Ctrl+V from the clipboard, using an image URL, or using a page URL. Analysis starts immediately.

  2. Choose how many colors to extract and how to combine them. Median cut preserves proportions, k-means separates similar shades more effectively, and “Accents” extracts bright and muted colors separately.

  3. Click the eyedropper directly on the image. The color at that point will be added to the palette and locked. The ×8 magnifier shows exactly which pixel you are targeting.

  4. Reorder, remove, or replace unwanted colors in the list. Locked colors remain when you change the color count or analysis method.

  5. Switch the format between HEX, RGB, HSL, HSV, CMYK, OKLCH, and Lab. It applies to the list, copying, and file exports.

  6. Check the contrast matrix. It immediately shows which pair of palette colors can be used for text and a background.

  7. Download the result as a file: CSS, SCSS, Tailwind, JSON, ASE, GPL, sketchpalette, PNG, or SVG. The palette link can be sent to anyone.

promoBrowser task listNo account required—everything is stored on your device.Open

The formula and what it includes

32×32×32 histogram → reduction to N colors → proportion by nearest color

Pixels that are more than half transparent are not counted because their color is not visible anyway. In “Accurate” mode, analysis uses the full resolution. The only limit applies to very large images: starting at four megapixels, the image is reduced by area.

Example analysis: an image with two colors

The input data is the same as the default field values: you can calculate it mentally and confirm that the tool is telling the truth.

  1. The histogram uses two bins: the red bin has a count of 60, and the blue bin has a count of 40. The remaining 32 766 bins are empty and are not included in the analysis.

  2. Both bins are in the same box. The red and blue ranges are 255, while the green range is 0. When tied, the first channel is selected: red.

  3. We split on red at the point where the same number of pixels falls on each side: the blue bin on the left and the red bin on the right.

  4. Each box contains one bin, so there is nothing left to split. Two colors are returned instead of four.

  5. The box color is the average of its pixels: #0000FF and #FF0000. The proportions are 40% and 60%.

Palette: #FF0000 — 60%, #0000FF — 40%. Ordered by proportion. Fewer colors than requested are returned because the image contains only two colors.

Frequently asked questions

promoAll toolsForty-four tools, all running in your browser.Open

Related tools

5

WCAG contrast checker

Calculates the contrast of a color pair and shows whether it passes AA and AAA.

Open