Back to Glossary
Video

Chroma Key

Also known as: Color Keying, Green Screen Keying

What Is Chroma Key?

Chroma key is a compositing technique that makes one color in a shot transparent so that a separately recorded image or video shows through behind the subject. The color is usually the green or blue of a backdrop, though any flat color that the subject doesn’t contain will work.

TV weather forecasts, film effects and live streams all depend on it. The picture shows one shot of a person before an unevenly lit green screen, keyed twice at the same threshold. Pure green as the key color leaves most of the darker screen in place, while a color picked from the screen removes all of it.

How Does a Keyer Decide What to Remove?

A keyer compares every pixel with the key color and writes the result into a matte, a grayscale map in which white stays, black is removed and gray is partly see-through. A handful of controls shape that matte, and each one fails in a way you can recognize.

  What it does If it is off
Key color The color the keyer removes, picked from the screen or typed in Shadows and darker corners of the screen stay in the shot
Tolerance How far a color may be from the key color and still turn fully transparent Too low leaves patches of screen, too high eats into green or green-lit parts of the subject
Softness How gradually colors just outside the tolerance fade out Too low gives hard, jagged outlines, too high leaves colors near the screen partly see-through
Spill suppression Takes the screen's color cast off hair, skin and edges Too little leaves a green fringe, too much pushes skin toward magenta
Matte cleanup Shrinks, grows, softens or fills holes in the matte after the key Shrinking it too far shaves off fine edges such as hair
Garbage and holdout mattes Hand-drawn shapes that force an area to transparent, such as a light stand, or to opaque, such as a green prop Without them, rigging beyond the screen stays and parts of the subject vanish

Why Is a Green Screen Green, and When Is Blue Better?

Green and blue became the standard because both sit far from skin tones in hue, and green usually wins on digital cameras because they record it in the most detail. Blue takes over when the subject is green.

Use green for

  • Most shoots on digital cameras

    Most single-sensor cameras use a Bayer filter, which puts green filters on half of the photosites and red and blue on a quarter each, because green carries most of the brightness detail the eye notices. A Kodak patent on chroma-key photography prefers a green key for that reason, since the green channel has the most samples and the least noise.

  • Subjects with no green on them

    A keyer separates subject and screen by color, and skin of every tone is far from green. A shirt, prop or plant in green would disappear along with the backdrop.

Use blue for

  • Green costumes, props or plants

    Productions switch to blue for these scenes, since anything in the key color disappears with the screen.

  • Less colored light on the subject

    Boris FX notes that blue throws less colored light back onto the subject. It is darker, though, so the screen needs more light.

How Do You Shoot Footage That Keys Cleanly?

Light the screen evenly, keep the subject well away from it and record with as little color compression as the camera allows. Each of those prevents a problem that a keyer can only partly fix afterward.

Light the screen evenly and the subject on its own

A shadow or hot spot reads as a different green, so soft, even light across the whole backdrop matters more than a bright one. Light the subject separately to match the scene they will appear in; Corridor Digital’s David Carmichael and Litepanels co-founder Pat Grosswendt both light the subject first.

Keep the subject away from the screen

Light bouncing off the screen tints hair, shoulders and white clothing, and the keyer keeps that cast because it seems to belong to the subject. More distance and a larger screen reduce it. Matte surfaces light more evenly than shiny ones, though Litepanels recommends reflective fabric because it needs less light.

Record 4:2:2 or better where the camera allows

Most video stores color at a lower resolution than brightness. In 4:2:0 footage one color sample covers a block of four pixels, which leaves blocky, stair-stepped edges after the key, while 4:2:2 keeps twice as much color and uncompressed 4:4:4 keys cleanest. Canon recommends 4:2:2 for green screen work.

Can You Remove a Background Without a Green Screen?

Yes. A segmentation model, a reference shot of the empty background or an LED wall can each replace a background without keying a color, and each comes with its own limits.

A segmentation model finds the person instead of a color

Video-call apps use machine learning to cut people out of any room. In 2020 Google described the model behind background replacement in Google Meet on the web: about 400 KB, running at 70 frames per second on 720p video on a 2018 MacBook Pro and at 33 on a Celeron Chromebook.

A clean plate of the empty set can stand in for the screen

A difference matte compares each frame with a shot of the same background without the subject and removes whatever matches. Final Cut Pro’s Scene Removal Mask also starts from a frame of the empty background, and it needs a static background, a camera that stays still and a few frames with nobody in them.

An LED wall puts the background in the shot

Virtual production stages surround actors with LED walls showing the scene, rendered live from the tracked camera’s point of view, so much of the composite is filmed in camera. fxguide reported that more than half of The Mandalorian’s first season was shot this way, with the wall lighting the reflective armor in the scene’s own colors instead of green.

When Should You Use Chroma Key?

Use it whenever the subject stands in front of one flat color, and pick another method when it doesn’t. On a language-learning platform, for example, teachers record each lesson with a green sheet hung behind them, and the editor puts that lesson’s slide in its place.

Use chroma key for

  • Footage shot on a green or blue backdrop

    Pick the key color from the screen, and the key removes the backdrop frame by frame, video included.

  • A logo, product or sky against one flat color

    Set the key to that color instead of green. Any uniform color works as long as the subject does not contain it.

Use another method for

  • A photo with no screen behind the subject

    AI background removal uses a segmentation model to find the subject in a busy scene.

  • A live call with no screen

    A segmentation model, as video-call apps use, needs no backdrop, though Zoom says a real screen gives a better result with fewer system resources.

  • A large production with reflective costumes or sets

    An LED volume puts the scene's own light and reflections in the shot from the start.

How Chroma Key Works in CE.SDK

With its Green Screen effect, CE.SDK keys images as well as clips in video editing, on Web, iOS, Android and Server, and on web and mobile the GPU renders the key in real time. The step your users need comes down to whether they are setting the key color, tuning the result or placing the keyed layer over a new background. For photos with no screen at all, CE.SDK’s background removal plugin is the better fit on web.

Step 01

Sample the screen’s own green as the key color

When users key a clip or photo shot against a screen, they open the Green Screen effect under Style and then Effect on web. They set Source Color to the green of their screen, with the color picker’s eyedropper in desktop Chrome and Edge or with a hex value in any browser. In our test of CE.SDK 1.84, the default pure green key left a darker, slightly bluer screen green (#00B140) about a third visible and did not touch it once it was 20% darker. Picking that green as the key color removed it from full brightness down to 30%.

Step 02

Raise Color Match only as far as the shot needs

When patches of screen remain, raising Color Match widens the range of greens the effect removes, and it reaches the subject sooner than you might expect. In the same test, Color Match 60 reached the screen green down to about half brightness. It also removed a sea-green shirt, skin with a 40% green cast and hair with a 30% green cast, while the picked key color had kept all of them except the shirt. Smoothness softens the edge, and Spill desaturates a green cast on hair and skin without bringing back the original color, so distance from the screen still matters.

Step 03

Put the new background on the layer below

When the keyed clip should play over another scene, users place it on an overlay track above the new background clip, or send a still image behind a keyed photo, and the background shows through wherever the key removed color. Users can turn the effect off and on again and keep its settings, which makes before-and-after checks quick. Video composition covers how those layers combine in a finished video.

FAQs

Not quite, although people often treat the two terms as one. The green screen is the painted wall, fabric or paper that stands behind the subject during the shoot, while chroma keying is the later step in software that turns that color transparent. A blue screen or a backdrop in some other flat color is keyed the same way.

Chroma means color, and a key is the signal that switches between two pictures. RCA used "Chroma-Key" as its name for the process on NBC in the 1950s. The BBC called its version Colour Separation Overlay, or CSO, and first used it in 1959.

Larry Butler is usually credited with the first blue-screen traveling matte, made for the genie scene in The Thief of Bagdad, a 1940 film that took the Oscar for special effects. Petro Vlahos then patented a color-difference process, filed in 1959, that could keep smoke, glassware, blowing hair and motion blur that earlier mattes lost. In 1976 he founded Ultimatte with his son Paul to build compositing equipment on the same idea.

Disney used the sodium vapor process on Mary Poppins (1964). Actors performed before a white backing lit by sodium lamps, whose narrow yellow light fell in a gap in color film, and a prism camera recorded the scene and a separate matte at the same time. It kept fine detail such as hair, veils and motion blur, but only three of the special prisms were ever made.

A chroma key removes pixels by color, while a luma key removes them by brightness. A luma key suits a logo or title on solid black, where every dark pixel can go and every bright one stays, with grays turning partly transparent. It cannot separate a person from a green wall, because the two can be equally bright.