Reference-based color matching · no upload, no watermark

Match Photo Colors

Make a set of photos share the look of one reference picture. The tool measures the reference's lightness and color in CIELAB, then moves each photo towards it, either by matching the average and spread or by matching the whole histogram. Useful for product shots, event sets and before-and-after edits.

1. Reference

The picture whose colors you want

Drop the reference picture here

One picture. It is only read for its colors.

2. Photos to match

Drop photos here or click to choose

Up to 50 pictures, 25 MB each.

3. Match

How far brightness and contrast move towards the reference.

How far the color balance and saturation move.

Export

Preview

Add a reference and a photo

Choose a reference picture first.

Match Photo Colors

Operator: Abdulla Al Fahad. How tools are built and checked

Product photos from three sessions, one cool, one warm and one dark, are tedious to fix by eye because every picture needs its own sliders. If one photo already looks right, it can be the target instead. This tool measures the colors of that reference and moves every other picture towards it, with separate control over lightness and color, a before-and-after slider, and up to 50 photos exported as a ZIP.

The method is a CIELAB variant of Reinhard, Ashikhmin, Gooch and Shirley's 2001 color transfer, which shifts and stretches each channel so its average and spread match the reference. A full-histogram option is the stronger alternative. Unlike a LUT, nothing is fixed in advance: the grade is derived from the picture you choose.

Key features

  • Reference-based matching in CIELAB
  • Average and spread, or full histogram
  • Separate strength for lightness and for color
  • A spread limiter, a before-and-after slider and batch export of up to 50 pictures to a ZIP

Color transfer in CIELAB

Color is compared in CIELAB, which keeps lightness (L) apart from the two color axes (a, green to red, and b, blue to yellow), so a change in color balance does not shift brightness. Average and spread, the default, matches each channel's mean and standard deviation to the reference's. Full histogram matches the whole distribution through 256 bins per channel, which is stronger and can look harsh when the pictures differ in content. Both strengths start at 100 percent, and the spread limiter starts on.

The reference is shrunk to at most 640 pixels on its longest side before it is measured, and pixels that are nearly transparent are ignored. Photos can be PNG, JPG, WEBP, GIF (first frame) or BMP, up to 25 MB each and 50 at a time, and export as PNG, JPG or WEBP at the original size up to 8192 pixels on the long side. Pictures are treated as sRGB with no color-profile handling.

How it works

For the reference the tool computes the mean and standard deviation of L, a and b, plus a cumulative histogram of each. For each photo it computes the same, then moves every pixel. With average and spread the new value is the old value minus the photo's mean, times the ratio of the reference's spread to the photo's spread, plus the reference's mean.

That ratio is held between 0.4 and 2.5 while the limiter is on, so a very flat reference cannot stretch a photo into noise and a very contrasty one cannot crush it. With full histogram each value is replaced by the reference value at the same position in the cumulative distribution.

The two strength sliders blend between the original and the matched value, one for lightness and one for the a and b axes. Setting lightness to 0 borrows the color balance while keeping each photo's own exposure. The result is converted back to RGB and clipped to the displayable range.

Common use cases

  • Twenty product shots taken under two different lamps are matched to the one shot you like. Both lamp groups land on the same color balance in a single export.
  • A 30-photo market-stall series shot at 10:00 and again at 16:00. Choosing a morning frame as the reference pulls the later shots back from their orange cast.

How to use this tool

  1. Drop the reference picture whose colors you want.
  2. Add the photos to adjust, one or many, and pick a method.
  3. Set lightness and color strength while watching the preview slider, then download the picture or the ZIP.

Example

A warm four-pixel test strip matched to a cool one, average and spread

photo      mean L 62.1, a 11.7, b 30.6   spread 16.5, 2.5, 3.9
reference  mean L 59.1, a  0.4, b -16.7  spread 20.1, 1.8, 5.2
photo pixel 1 is RGB 210, 160, 110

The same pixel after matching

lightness 100, color 100   155, 166, 189
lightness 0, color 100     159, 170, 193 (exposure kept)
lightness 60, color 60     182, 164, 158

Tips for best results

  • To borrow only the color balance, set lightness strength to 0. In the test strip that keeps the mean lightness at 62.1 and still moves the first pixel from warm to cool.
  • Turn the limiter off only when the reference and the photos have similar contrast. A reference whose lightness spread is below 40 percent or above 250 percent of the photo's is clamped when it is on.
  • Statistics count every pixel, so a reference that is mostly blue sky pulls the b mean strongly negative. Pick a reference whose area is dominated by the same kind of subject as your photos.

Common pitfalls

Color transfer works on statistics, not content. Skin tones and sky can shift together in an unwanted way, because the tool cannot tell them apart.

A reference with a strong color cast passes that cast on. Match to a neutral reference if the goal is to remove casts.

Strong histogram matching can band smooth gradients such as skies, since it rebuilds the distribution bin by bin.

A photo that is almost one color has a tiny spread, so its ratio is large. The limiter caps the stretch at 2.5, and with it off the same photo can turn noisy.

Common errors and how to fix them

This reference picture is fully transparent
Choose a reference with visible pixels. Transparent areas are ignored, so there must be some opaque ones to measure.

Best practices

  • Preview the darkest and the brightest photo of the batch before exporting. The same reference pulls them in opposite directions, and one setting rarely suits both.
  • Pick the reference for its tonal range as well as its look. If results turn flat or harsh, choose a reference whose contrast is closer to your photos' instead of lowering the strength.

Average and spread, or full histogram

Average and spread keeps the shape of each photo's own distribution and only shifts and scales it. Full histogram replaces the distribution with the reference's. On the test strip above, at full strength:

  • Average and spread turns pixel 1 into 155, 166, 189, and the photo's channel means become exactly the reference's
  • Full histogram turns it into 151, 170, 198. With only four pixels each, rank-for-rank matching lands almost on the reference's own first pixel (150, 170, 200)
  • Use the first for sets that already look alike, and the second for a photo with a very different tonal range

Frequently asked questions

Why CIELAB and not RGB?

CIELAB keeps lightness separate from color, so one can change without disturbing the other, and distances in it are closer to what the eye notices than distances in RGB.