Skip to content
OddsockLocal
Local

No files yet.

Waiting for inputRuns in this browser. Nothing is uploaded.

How to use

  1. Choose an image.
  2. Set the number of colors. 6 is the opening count. Use fewer for a flat subject.
  3. Copy the --color variables.

What is Palette from a photo?

A photograph already has a palette, and sampling one pixel with an eyedropper usually hits a shadow or a highlight instead of the color the picture is actually made of. This page groups the opaque pixels into coarse bins, weights each bin by how much paint is there, and writes the strongest bins as --color-1, --color-2, and so on. The count opens at 6. Transparent pixels are skipped, so a PNG logo on a clear background does not invent a color from the empty space.

Read more

The bins are rough on purpose: each channel is folded into 16 levels before counting, so two nearby jpeg speckles become one swatch. The HEX is the average of the pixels that fell in that bin, not the first pixel. Order is by weight, heaviest first. A foggy photo of one wall returns several near-duplicates. Lower the count. A street scene with a sign, a coat, and a sky can use all six.

These variables are not a harmony. The palette maker rotates a color you type. The color picker spells one color you type. This page only reads the file. The picture stays in the tab.

Use cases

  • A designer pulls six colors from a campaign photo before naming them.
  • A developer turns a product shot into --color-1 through --color-6 for a theme draft.
  • A student compares a logo PNG's ink with the white they thought was in the file.
  • A merchandiser checks whether a pack shot is mostly one red or several.
  • An illustrator samples a scanned painting after lowering the count to three inks.

Six colors from one photo

A photo, number of colors 6.

Up to six lines, --color-1 through --color-6, each a HEX average of a pixel bin. The heaviest bin is --color-1. Fully transparent pixels are not counted.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

A photo of one surface still fills several bins. Lower the count, or pick one swatch and build a real ramp in the palette maker.