removebgpictureStart
Two white camellias photographed on a grey backdrop
The same camellias cut out, on a transparency checkerboard
Colour Spill

Guide

Where colour fringe comes from

The outline is right and the edge is the wrong colour: green in front of a hedge, white on a dark page, a grey ring round a logo. None of that is the outline’s fault. It is the colour the edge pixels really had.

The arithmetic of a mixed pixel

A camera pixel on the boundary of a strand of hair collects light from the hair and from whatever is behind it. If a third of it is hair, its colour is one third hair and two thirds background. Written down, the observed colour C is a blend: C = αF + (1 − α)B, where F is the subject’s own colour, B the background’s and α how much of the pixel the subject covers.

A cutout decides α. If it then keeps C as the pixel’s colour, two thirds of the background travels with the hair into the new picture. On the old background it was invisible; on anything else it is a rim.

Three ways the background is taken back out, and when each applies
MethodWhat it knows about BWhere on this site
Unmix against the keyB exactly: the key colour you pickedColour key routes — white, any colour, logo, green screen
Fringe clean-upAn estimate of B from the gone pixels nearbyEdge panel, guided selection and models
Rebuild from colourB is the colour the old cutout was made onFix cutout edges — matte against white or black

Spill: the colour that lands on the subject

A green screen does a second thing. It lights the subject from behind with green, so hair and shoulders pick up a green cast that has nothing to do with mixed pixels. Spill suppression handles that: near the edge, the screen’s own channel is not allowed to rise above the larger of the other two. Grey stays grey, skin stays skin, and the green goes.

Why too much clean-up turns hair grey

Fringe clean-up needs B, and away from a colour key it is estimated from the fully gone pixels nearby. When the background is close in colour to the hair, the estimate is close to F too, and the solved colour drifts to a middle grey. Judge clean-up on the near-black backing, and stop as soon as the rim goes.

Reading the edge-tint number

The Save panel decodes the saved file and measures it. Edge tint is the average distance between part-way edge pixels and the solid subject next to them, in a colour space built so equal numbers look equally different. Single figures are a clean edge on a uniform subject; a rim of old background is usually twenty or more. It is a comparison number — the same picture before and after a change — rather than a grade.

  • Busy subjects read higher. A patterned shirt has edge pixels that differ from the solid pixels next to them for honest reasons.
  • Shadows are not counted. The number reads the subject’s own edge, not a shadow or outline added in Finish.

Questions about fringe

Is a green rim round my portrait a mistake in the outline?

Usually not. The outline is in the right place; the pixels along it really were part subject and part lawn, and the file carries the lawn's share of their colour. Fringe clean-up on the Edge panel solves that share back out.

Why does a colour key give cleaner edges than other methods?

Because it knows the background colour exactly. Every edge pixel is unmixed against the key colour itself rather than against an estimate from nearby pixels, so a logo on white comes out with soft, correct anti-aliasing instead of a grey ring.

What is spill suppression?

Green and blue screens bounce coloured light onto the subject: a green cast on hair and shoulders. Spill suppression limits the screen's channel to the larger of the other two near the edge, which neutralises the cast without touching the rest of the subject.

What does the edge-tint number on the Save panel measure?

The average colour distance between part-way edge pixels and the solid subject next to them, in the saved file, on a 0-to-100 scale of perceptual difference. A rim of old background reads high; a clean edge reads low. When a clean-up ran, the number before and after is shown.

My cutout from another tool has a white halo. Can it be fixed?

Yes, on the fix-cutout-edges page. If the halo came from a white page, each edge pixel's coverage can be worked out again from how much white is in it, and the white taken out.

Read next