GreenBG Remover

Can you chroma key against any colour, not just green or blue?

Yes, and that is the surprising part. We ran nine candidate screen colours through a full pipeline — Bayer sensor, shot and read noise, demosaic, 4:2:0 chroma subsampling, then the keyer — and every one of them removed the background completely. The matte does not care what colour your screen is. What disqualifies a colour is everything around the matte. Orange fails on distance: at 0.229 from common hair colours it is inside the 0.259 limit where the keyer stops working at all. White fails on wardrobe at 0.088. Blue clears every distance test and survives, but it costs 4.41 times the light to reach the same luminance and only a quarter of the sensor's photosites can see it, which is 1.39 dB of noise. Cyan and yellow key perfectly and then ruin your subject: being the brightest screens, they drag skin 0.171 and 0.130 away from its true colour against key green's 0.048. Key green wins because it is the only colour that clears all five tests, not because it keys better.

The matte itself does not care what colour you use

We built a scene with a known ground-truth alpha — a solid body, a one-pixel anti-aliased edge and a translucent halo standing in for hair — rendered it over each candidate colour, and pushed it through a camera: RGGB Bayer mosaic, shot noise and read noise, bilinear demosaic, 4:2:0 chroma subsampling, then the keyer with the same window for every colour. Each screen also threw its own spill onto the subject in proportion to its luminance.

The result is that colour barely matters to the matte:

Only two colours lost any of the subject at all, and both for the reason you would expect: orange is close to hair colours and white is close to a white shirt. Overall alpha error across the whole frame ran from 0.019 to 0.048, with the spread set almost entirely by how much light the screen put on the sensor — the brightest screens produced the cleanest mattes and blue, the darkest, produced the noisiest at 0.048.

So if you have ever been told that only green and blue work, that is not a property of keying. It is a property of the four tests below.

Test one: is it far enough from the things you cannot change?

Distances below are normalised sRGB, and the limit is 0.259 — the point our conditions piece measured, past which the keyer keeps a pixel as foreground. Under 0.161 it removes a pixel completely; between the two it goes semi-transparent.

Read the columns in order of how much control you have. Clothing you can change; hair you mostly cannot; skin you cannot at all. Orange is the clearest casualty: at 0.229 it sits inside the limit for dark brown and auburn hair, so a chunk of the subject turns translucent no matter how you tune. White is worse but for a fixable reason — it collides with a white shirt at 0.088, and shirts can be swapped.

One number here is worth keeping: magenta's nearest clothing distance is 0.879 against key green's 0.334. If your subject has to wear a green or blue kit, magenta is the safer screen, and it passes every other test below except sensor noise.

Test two: what does it cost to light?

Rec.709 luminance decides how much light you have to put on the screen to get it to a given level, and the differences are large:

Blue is roughly four and a half times more expensive to light than green, which is the real reason it lost the default spot despite being the safest colour on every distance test. It is also the reason blue survives in one specific job: night scenes, fog, and anything where you want the screen dark. If you are lighting a dark scene anyway, blue's cost largely disappears.

Test three: what does the cast do to skin?

Spill is proportional to the screen's luminance, so a bright screen throws more of itself onto your subject. We calibrated to 6% for key green and scaled from there; the drag column is how far that cast pulls skin away from its true colour:

This is the test that eliminates the bright screens. Cyan and yellow key beautifully and then paint your subject: they drag skin three times as far as key green does, because they are the brightest saturated colours available and the furthest from skin.

Blue looks like the winner here and it is not. Its 1.4% spill is entirely a consequence of it being dark. Light it to the same luminance as green — which is what you must do to get an acceptable exposure — and its spill rate rises to the same 6%, at which point it drags skin 0.058 against green's 0.048. The advantage was never the hue. It was the darkness.

We also checked whether a contaminated skin tone still falls inside the range real skin occupies, which is what makes despill ambiguous. At these spill rates it mostly does — eight of nine tones for green, blue, red, orange and magenta alike. The differences we found were magnitude, not kind: cyan six of nine and yellow five of nine, both because the cast is big enough to push skin out of its own range.

Test four: what does the sensor see?

A Bayer sensor is RGGB: half the photosites are green, a quarter red and a quarter blue. A screen colour only lands on the photosites that match it, so the effective signal — and the noise — depends on the colour. Relative to key green:

This is the small, unglamorous part of why green won: it is the colour the sensor is physically best at measuring, and it is also the colour that carries most of the luminance signal in Rec.709. Green is not magically keyable — it is the cheapest colour to record cleanly.

Everything here also sits on top of 4:2:0 chroma subsampling, which halves the resolution of the colour information in both axes and is the reason fine edges degrade in a way no screen colour can fix.

So which colour should you actually use?

Putting the five tests together:

Green, by default. It is the only colour that clears all five: far enough from skin, hair and most clothing, cheap to light, moderate spill, and sitting on the half of the sensor that works best.

Blue, for dark scenes and for anything where spill must be minimal — night, fog, or a subject in a bright white costume. Budget 4.4 times the light and accept the noise.

Magenta, when the wardrobe is the problem. It keeps 0.879 of distance to the closest clothing colour, versus green's 0.334, and it keys cleanly. It costs 1.12x the light and 1.39 dB, which is a fair trade when the alternative is a green shirt.

Never orange or white. Orange is inside the keyer's limit for common hair colours; white collides with a white shirt at 0.088 and has no chroma for the keyer to work with at all.

Red and yellow will key, and you will regret it. They pass every distance test and produce clean mattes. They also throw a cast that lands inside the range of real skin colours, which is the one problem despill cannot solve.

Where these numbers stop

The simulation is a model, not a shoot. The camera is a single synthetic RGGB pipeline with a 4000-electron full well and 3 electrons of read noise; real sensors differ in quantum efficiency, in how much green they actually pass, and in their noise floors.

The screen in the simulation is perfectly evenly lit. That is the optimistic case, and our piece on the conditions for automatic removal measured how little unevenness it takes to break a key — unevenness is a much bigger failure source than colour choice, and none of it is in these figures.

Skin, hair and clothing are nine, seven and nine representative colours we chose, not a measured survey of real wardrobes or real complexions. The distance numbers will move if your subject's colours sit outside them; the method for checking will not.

The 0.259 limit and the keyer window are from the tool we measured. Other keyers use different colour spaces and different windows, and a keyer with despill built in will handle the spill cases better than these numbers suggest — though despill is exactly what the ambiguity problem limits.

Finally, spill is modelled as uniform across the subject with a falloff from the edge, and scaled only by luminance. Real spill depends on geometry, on the finish of the screen and on how close the subject stands, all of which our distance piece covers separately.

Related questions

Can you chroma key against any colour?

Almost any saturated one. In our simulation all nine candidates removed the background completely with the same keyer settings. What disqualifies a colour is not keying: orange fails at 0.229 from common hair colours, white fails against a white shirt at 0.088, blue needs 4.41x the light, and cyan and yellow drag skin 0.171 and 0.130 from its true colour.

Why is green the standard chroma key colour?

It is the only colour that clears all five tests: distance to skin, hair and clothing; lighting cost; spill; and sensor efficiency. Green also sits on half the photosites of a Bayer sensor and carries 71.5% of Rec.709 luminance, so it is the cheapest colour to record cleanly.

Can I use a blue screen instead of a green one?

Yes, and it is the better choice for dark or night scenes. It is the safest colour on every distance test (0.961 from skin, 0.951 from hair) but its luminance is only 0.072 against green's 0.318, so it needs about 4.4 times the light, and it loses 1.39 dB because only a quarter of the sensor's photosites can see it.

Why can't I use an orange or white screen?

Orange sits 0.229 from common hair colours, inside the 0.259 limit where the keyer stops removing anything. White collides with a white shirt at 0.088 and has zero chroma amplitude, so there is no colour signal for the keyer to separate on.

What screen colour should I use if my subject wears green?

Magenta. Its closest clothing distance is 0.879 against key green's 0.334, and it clears every other test except sensor noise, where it costs 1.39 dB. Cyan is the alternative at 0.810, but it is one of the brightest screens and drags skin 0.171.

Open the green screen remover