GreenBG Remover

Why won't one key handle the whole green screen?

Because a chroma key is a single sphere in RGB: one centre colour and one radius, applied identically to every pixel in the frame, while a real screen is a brightness field that varies across its own surface. On the 3 m screen we modelled, lit by two lights 2 m out, brightness spanned 1.06 stops from the brightest point to the darkest, and the default tolerance here stops removing screen altogether beyond 0.62 stops of falloff. We measured the collision directly: the key left 42.8% of the screen behind at the default settings, and the one global tolerance that finally cleans it — 84 — deletes the green-contaminated hair on the subject, which only survives below 53.

What one key actually is in the code

Open the keyer behind this page and the whole decision reduces to one number per pixel: the Euclidean distance from your pixel to the key colour in normalised RGB. A pixel closer than tol - soft is treated as pure background, a pixel further than tol + soft is treated as pure subject, and everything between is faded with a smoothstep. Tolerance is the slider reading divided by 200, edge softness is the slider divided by 285.

At the defaults — tolerance 42, softness 14 — that gives a capture window of 0.161 to 0.259. That is the entire working range: a shell 0.098 thick, measured from one fixed point in colour space. There is no second centre, no per-region radius and no spatial term anywhere in the loop. Every pixel in every frame is judged against the same point.

So the question is not really "can this keyer find green". It is whether every shade your screen actually produces lands inside one shell around one colour.

A screen is a brightness field, not a colour

To put a number on that, we modelled a 3.0 m wide screen lit by two lights placed 2.0 m in front of it at plus and minus 0.75 m, and let illuminance follow the geometry: a surface turned away from a light loses both to the cosine of the angle and to the inverse square of the distance, so brightness scales as (h/r) cubed. Nothing in the field below is guessed; it all falls out of those three numbers. Normalising so the point you would eyedropper reads exactly #00B140, the screen then ranged from 0.985 down to 0.479 — 1.06 stops of spread across one piece of cloth.

Split into five vertical bands, the mean brightness ran 0.735 on the far left, 0.873 and 0.836 across the middle three, and 0.725 on the far right, with the darkest visible pixel at 0.479. A 25-degree crease in the fabric made it worse and behaved asymmetrically: the flank that turns away from the light read 0.679, while the flank that turns toward it only reached 0.801.

How much falloff a single tolerance can absorb

Dimming a screen scales all three channels together, so the distance it moves from the key colour is simply (1 - 2^-s) multiplied by the length of the key colour vector. For #00B140 that length is 0.7381, which makes one stop of falloff worth 0.369 of distance — more than three times the width of the entire soft band.

Working backwards through the same relation gives the limits of the default settings. Screen stays fully transparent only while it is within about 0.355 stops of the exposure you sampled, and it is fully opaque again by 0.623 stops. The whole graduated region between them spans 0.268 stops. Push the tolerance slider to its maximum of 100 and the radius reaches 0.500, which buys you 1.632 stops — and note that our two-light screen already needs 1.06 of them before a fold enters the picture.

What the default key leaves behind

We built a 640x360 frame from that field — 159,386 screen pixels, 64,223 solid subject, 4,953 semi-transparent rim pixels and 5,588 pixels of hair carrying green spill — and ran this page's keyer at its defaults. The two outer bands came back almost untouched: 67.96% of the far-left screen pixels and 70.73% of the far-right ones still carried opacity. The centre band, where you sampled the colour, came back at 0.00%.

The fold was the worst thing in the frame. Its shadowed flank kept 76.64% of its pixels, and its lit flank kept 31.11% — a useful reminder that the sphere measures distance, not direction. Being brighter than your key colour costs exactly as much as being darker. Across the whole screen, 42.79% of the background was still there after one pass at the default settings.

The collision: what the screen needs against what the subject survives

Now raise the one slider until each region cleans up. The centre band needs 38. The two flanking bands need 48. The far-left band needs 70, the far-right band 78, the lit flank of the fold 58, and the shadowed flank of the fold 84. One global control has to be set to the worst of those, so the whole frame runs at 84 — and at 84 the screen is finally clean, with 0.02% residual.

The subject does not survive it. Hair carrying spill sits roughly 0.295 from the key colour, which is closer than the darkest corner's 0.385, so the growing sphere reaches it first. At similarity 84 the spill-hair region went from alpha 1.000 to 0.000 — all 5,588 pixels of it, 8.70% of the subject, punched into holes — and the semi-transparent rim lost 46.5% of its mass, collapsing from 3,392 to 1,814. Tracing the hair's opacity across the slider, it drops below 95% at similarity 53.

That is the whole answer in two numbers. The screen is clean only at 84 and above. The hair is intact only below 53. There is no value in between that does both, which is exactly what a working colourist meant when he wrote that you should use the best keying software you can and not expect a single key to handle it all.

Why more tolerance always eats the subject first

The sphere grows in every direction at once, and it has no way to tell a background pixel that drifted from a foreground pixel that happened to live there. A hair strand rimmed with green is a legitimate subject pixel sitting inside the very region you are trying to claim for the screen. Hue drift spends the same budget as brightness, too: 20 levels of blue on your screen costs 0.078 of distance, which is worth 0.162 stops of falloff.

Semi-transparent edges fail the same way. A strand pixel is supposed to keep an alpha equal to how much of it is hair, and pushing tolerance drives that value down until the strand disappears rather than thins. That is the 46.5% rim loss above: not a greener edge, but a missing one.

What does work instead

Give each region its own radius. Running the five bands at 70, 48, 38, 48 and 78 produced 0.68% residual with zero subject holes, spill hair still at 1.000 and rim mass at 3,262 — a 3.8% loss instead of 46.5%. It works because of where the subject stands: it occupies the brightest band, which is the one needing the least tolerance, so the aggressive settings never touch it. Adding a bounded patch at 84 over the fold alone, in a band that contains no subject, took residual to 0.42% with still no holes.

This page's AI subject mode helps from the other side. It merges by taking the greater of the two alphas, so it can only ever add opacity. That is why it cannot rescue an uneven screen on its own — at the default tolerance the residual stayed at 42.79% with the union applied — but it does hold the subject while you push the colour key hard. Modelled with an ideal subject mask, chroma at 84 plus the union gave 0.02% residual with the hair back at 1.000.

The order matters more than the settings. Flattening the lighting first shrinks the spread, which lowers the tolerance every region needs — the only move that protects subject and screen at once. Regional passes come next, AI subject mode last. A tolerance high enough to swallow a fold is a sign the cloth needed stretching and lighting before you pressed record.

Related questions

Isn't a bigger tolerance just strictly better?

No. The radius grows in every direction at once, so every point you add to the screen is also added to the subject. In our run, going from 42 to 84 cleaned the last 42.8% of the screen and simultaneously removed all 5,588 pixels of spill-contaminated hair, because that hair sits closer to the key colour than the darkest corner does.

Why does the dark side of a wrinkle break the key worse than the bright side?

Turning a surface away from the light costs more than turning it toward the light gains. With a 25-degree fold at a 25-degree incidence, the shaded flank measured 0.679 of the reference brightness and the lit flank 0.801 — about half a stop lost against a seventh of a stop gained.

How many stops of uneven lighting can I get away with?

At the default tolerance and softness, screen stays fully transparent to about 0.355 stops of falloff and is fully opaque again by 0.623 stops, with a graduated band 0.268 stops wide in between. The slider's maximum radius of 0.500 corresponds to 1.632 stops. Our two-light 3 m screen spanned 1.06 stops before any fold.

Can AI subject mode fix an uneven screen?

Not on its own. The merge takes the greater of the two alphas, so it can add opacity but never remove it: with the union applied at the default settings the residual stayed exactly where it was at 42.79%. What it does is protect the subject, so you can raise tolerance to clean the corners without losing hair.

Open the green screen remover