§ 11 — Tools / 19Photo files● Runs in your browser
Photo color palette extractor
Pull the dominant colors out of a photo as hex values you can copy, for mood boards, brand palettes or matching prints to a wall.
All toolsChoose a photo to pull its dominant colours.
How it works
The method behind the numbers.
The photo is shrunk to about 128 px on its long edge, then its pixels are grouped by median cut: take the group with the most pixels and the widest spread of colour, split it in two at the median of its widest channel (red, green or blue), moved to the nearest change in value so one colour is not cut in half, and repeat until there are as many groups as you asked for. Each swatch is the average colour of one group.
swatch = mean(R, G, B) of the pixels in the group
share = pixels in the group ÷ pixels sampled- Nothing is random, so the same photo and the same count always give the same palette.
- Averages are not always colours that appear in the photo. A group that mixes sky and foliage can average to a grey-green that is nowhere in the frame.
- Pixels that are mostly transparent are ignored. If the photo has only a few distinct colours you may get fewer swatches than you asked for.
- Values are sRGB as the browser decoded the file, so they will not match a wide-gamut or printed rendering exactly. HSL is written in CSS syntax.