CHROMA KEY NOTES / 016
Preset Green vs Sampling the Real Backdrop Color
Sampling is not the upgrade people assume it is. On a clean studio frame the preset cleared 180,460 pixels at the default tolerance, while a single sampled corner cleared 36,875 of 268,800, because sampling makes the key one pixel wide and the slider can only reach 39 RGB units from it. Sample when the measured spread of your backdrop is under that reach, pick the middle of the screen rather than a corner, and keep the preset when the screen is already even.
Open the green screen remover ↗
Two modes, two different measurements
The green preset does not compare colours the way an eyedropper does. It scores every pixel by how much green it carries beyond the larger of its red and blue channels, then maps the slider from 0 to 100 onto a threshold between 183 and 247. A pixel is a candidate when its score sits under that threshold, so a backdrop that is merely greenish still passes, even if it is nowhere near the exact preset colour.
A sampled key throws that away. The custom colour branch computes a plain Euclidean distance in RGB between the pixel and the one colour you clicked, and maps the same 0 to 100 slider onto a distance of 4 to 39. The maths is smaller in every way: no channel-weighting, no normalising, and a reach that maxes out at 39 units out of a possible 441.
That small reach is the whole story. On the same 640 by 420 frame, the preset found 179,869 candidates at tolerance 0 and 180,461 at tolerance 24. The nearest of six backdrop samples, the top-left corner at #00D26A, needed a tolerance of 0 and reached 36,875 pixels. Both are correct. They are answers to different questions: one asks whether a pixel is green enough, the other asks whether it is close enough to one address.
What the four corners actually say
To answer "which pixel should I click", the useful measurement is not the colour of one pixel but the disagreement between several. I sampled six points on each of three studio frames with progressively worse lighting, at 12, 50 and 88 percent of the frame width and height, plus the centre and the crease at the bottom edge.
| Frame | Nearest point to preset | Farthest point | Distance range | Preset tolerance needed |
|---|---|---|---|---|
| Evenly lit | 12.6 | 42.1 | 36.3 units | 100 |
| One side falling off | 12.6 | 98.5 | 85.9 units | 100 |
| Half the screen dark | 26.0 | 197.9 | 171.9 units | 100 |
Read the last column first. In all three frames the farthest point is more than 39 units from the preset, which is the top of the custom branch's reach. That means no single sample of the preset colour can cover these frames through the custom mode, at any slider position: the code clamps the cutoff at 39 and stops. The preset mode still works on them, because it is not measuring distance from a point at all.
Read the middle columns next. The clean frame has a 36-unit range, which is just inside the 39-unit reach. This is exactly the case where sampling can work, and even there a corner sample is the wrong choice: the corner sits at one end of the range, so the opposite corner is always outside. In the evenly lit frame the top-left sample left 225,107 pixels behind, while the top-right sample left none.
Why a corner is the worst place to click
A real backdrop is lit from one side. The light falls off across the fabric, so the two corners are not the same colour and the crease where it meets the floor is a third colour. When you click one pixel, you are choosing that one corner's amount of light as the key, and the slider becomes a radius of acceptance around it.
In the evenly lit frame, the distance from the preset to the sampled corners ran 5.8, 32.7, 14.8 and 42.1 units for top-left to bottom-right, and 29.5 at the crease. Click the top-left and you need a cutoff of about 33 to include the bottom-right, which is 82 percent of the slider. Click the bottom-right and the same reach covers everything, at the cost of a wider band of accepted near-green pixels. Click the centre and you get 23.9 for the cutoff, which is 57 on the slider and leaves a margin on both sides.
- Sample the middle of the fabric, not the top corners where the key light is strongest.
- If the software allows several samples, take two at opposite corners and let it average, or take the midpoint of the two readings by hand.
- Skip the crease and the floor. A fold that faces away from the light reads about 40 percent darker and belongs to the same cloth.
The case that breaks both keys
A creased or seamed screen separates the frame into regions that a single key cannot span. I took the same composite frame, dropped a 36-pixel-wide panel to 42 percent brightness to simulate a fold, and ran the same six samples through the custom key at the tolerance each one needs.
The flat-panel samples cleared 180,460 pixels and left 34.1 percent of the frame behind: the subject survived untouched, but so did the fold. The fold sample landed on a pixel at distance 100 from the preset, which needs tolerance 100 to cover the flat panel, and at that reach 2,898 subject pixels disappeared with it while 98.3 percent of the frame stayed on screen. A horizontal banding variant behaved the same way: the flat sample left 45.3 percent, the band sample left 98.8 percent and took 3,272 subject pixels.
Sampling the wrong thing is worse than not sampling
There is a failure that only appears with an eyedropper and never with a preset: clicking the subject. The preset cannot do it, because the preset is green and a person is not. Once the key is an arbitrary colour, any pixel is fair game.
With the key set on a mid skin tone at #C69678 and the slider at its default, the result was 99 subject pixels removed and 268,701 pixels left in place. A dark wardrobe sample did slightly more damage to the subject and even less to the screen. A near-white wall sample was the only one that started to move a useful number of pixels, and it did so by deleting 2,276 subject pixels, 4.1 percent of the figure. None of these is a lucky accident of the maths: a key placed where the subject lives clears the subject, and the parts of the subject nearest that colour go first.
When the answer is a decision, not a slider
The useful comparison is not "preset versus sample" but two distances. The first is the spread of the backdrop: the largest gap between any two points on it, which for the middle frame was 85.9 units. The second is the distance from the backdrop to the nearest subject colour, which was 105.0 units on the same file. When the second is comfortably larger than the first, a key exists and the job is to place it sensibly. When they overlap, no placement works and no tolerance rescues it.
This is not a claim borrowed from anyone else's page. The green-subject frame in an earlier round of measurements cleared 259,875 pixels at tolerance 0, at 24, at 50 and at 100 alike, because 259,875 of its pixels scored 80 or above on green excess. Move the key to an arbitrary sample and you get the same collapse from the other direction: the radius has to grow past the subject before it reaches the far side of the screen. One experienced user of a video editor put the practical version of this into a question about sampling a screen that changes across the frame: "I use an eyedropper tool to pick a pixel that defines the greenscreen color which will be used overall the image... can I define multiple eyedropper points, resulting in a greenscreen color that varies depending on where in the image you are?" That is the right question, and the honest answer is that a single-point key cannot. A second person shot through a canvas painted green and could not key it: "When the phone's screen is a light color the green darkens; when the phone screen is black the green lightens. How do I prevent this, as I can't key out such a wide range of greens?" Their canvas did not have one colour to sample. It had a range.
The order that works
- Sample four corners and the centre, write the values down, and find the largest gap between them.
- If the gap is under 39 units, the preset is usually enough and costs nothing. On the evenly lit frame the gap was 36.3 and the preset cleared 180,460 pixels without touching the subject.
- If the gap is larger, sample the midpoint rather than any corner, then raise tolerance only as far as the measured half-gap. Anything past that is accepting pixels you did not measure.
- If the subject sits closer to the key than the far side of the screen does, stop. Relight, move the subject forward, or flag the shot; the slider is not going to fix a distribution.
What this does not do
The tool has one key at a time. It does not average several samples, does not let you set a second colour for the shadowed half of the screen, and does not track a backdrop that drifts from frame to frame. Those are the cases where a dedicated compositing application earns its price, and pretending otherwise would be a worse guide than admitting it. What the tool does give you is the measurement: the distance readout after sampling tells you how far the rest of the screen is from the pixel you clicked, which is the number that decides whether a second attempt is worth making.
Questions people actually ask
- Is sampling the backdrop with an eyedropper better than the preset green?
- No, not by default. On a clean studio frame the preset cleared 180,460 pixels at the default tolerance while a single sampled corner cleared 36,875, because the custom colour branch compares straight RGB distance and cannot reach a backdrop that varies by 85 units.
- Which pixel should I sample, a corner or the middle?
- Sample the middle of the backdrop, or the average of several samples, never a single corner. A corner sits at one end of the spread, so the opposite side of the screen lands outside the key: the top-left sample left 37.8 percent of the frame behind on the same file.
- Why does one sample clear half the screen and nothing else?
- Because the key is a single point and the tolerance is a fixed radius around it. The custom colour branch maps the whole 0 to 100 slider onto an RGB distance of 4 to 39, so anything farther than 39 units from the sampled pixel can never be cleared no matter where the slider goes.
- Should I sample the subject instead of the background?
- No. A key set on skin or on a garment clears almost none of the background and starts eating the subject: a skin-tone sample at tolerance 24 removed 99 subject pixels and left 268,701 of the 268,800 pixels in place, which is a worse result than doing nothing.
- How do I know before I sample that it will not work?
- Compare two numbers. If the spread of the backdrop is larger than the distance from the backdrop to the nearest subject colour, no key can separate them: the measured spread was 85.9 units against 105.0 units of subject separation, and the darker simulated screens pushed the spread to 100 and beyond.
- What is the preset actually comparing?
- Green excess, not raw RGB distance. The green preset scores each pixel as the green channel minus the larger of red and blue, divided by the channel sum, and maps 0 to 100 onto a threshold of 183 to 247, which is why the same slider number behaves differently in the two modes.