
Chroma key compositing, or chroma keying, is a
visual-effects and
post-production
Post-production, also known simply as post, is part of the process of filmmaking, video production, audio production, and photography. Post-production includes all stages of production occurring after principal photography or recording indivi ...
technique for
compositing (layering) two or more
image
An image or picture is a visual representation. An image can be Two-dimensional space, two-dimensional, such as a drawing, painting, or photograph, or Three-dimensional space, three-dimensional, such as a carving or sculpture. Images may be di ...
s or
video
Video is an Electronics, electronic medium for the recording, copying, playback, broadcasting, and display of moving picture, moving image, visual Media (communication), media. Video was first developed for mechanical television systems, whi ...
streams together based on colour hues (
chroma range). The technique has been used in many fields to
remove a background from the subject of a photo or video – particularly the
newscasting,
motion picture, and
video game
A video game or computer game is an electronic game that involves interaction with a user interface or input device (such as a joystick, game controller, controller, computer keyboard, keyboard, or motion sensing device) to generate visual fe ...
industries. A colour range in the foreground footage is made transparent, allowing separately filmed background footage or a static image to be inserted into the scene. The chroma keying technique is commonly used in
video production
Video production is the process of producing video content. It is the equivalent of filmmaking, but with video recorded either as analog signals on videotape, digitally in video tape or as computer files stored on optical discs, hard drives, SSDs, ...
and post-production. This technique is also referred to as colour keying, colour separation overlay (CSO; primarily by the
BBC
The British Broadcasting Corporation (BBC) is a British public service broadcaster headquartered at Broadcasting House in London, England. Originally established in 1922 as the British Broadcasting Company, it evolved into its current sta ...
), or by various terms for specific colour-related variants such as green screen or blue screen; chroma keying can be done with backgrounds of any colour that are uniform and distinct, but green and blue backgrounds are more commonly used because they differ most distinctly in hue from any
human skin colour. No part of the subject being filmed or photographed may duplicate the colour used as the backing, or the part may be erroneously identified as part of the backing.
It is commonly used for live
weather forecast broadcasts in which a
news presenter
A news presenter – also known as a newsreader, newscaster (short for "news broadcaster"), anchorman or anchorwoman, news anchor or simply an anchor – is a person who presents news during a news program on TV, radio or the Internet. ...
is seen standing in front of a
CGI map instead of a large blue or green background. Chroma keying is also common in the entertainment industry for visual effects in
movies and video games.
Rotoscopy may instead be carried out on subjects that are not in front of a green (or blue) screen.
Motion tracking can also be used in conjunction with chroma keying, such as to move the background as the subject moves.
History
Predecessors
Prior to the introduction of
travelling mattes and
optical printing,
double exposure was used to introduce elements into a scene which were not present in the initial exposure. This was done using black draping where a green screen would be used today.
George Albert Smith first used this approach in 1898. In 1903, ''
The Great Train Robbery'' by
Edwin S. Porter used double exposure to add background scenes to windows which were black when filmed on set, using a
garbage matte to expose only the window areas.
In order to have figures in one exposure actually move in front of a substituted background in the other, a travelling matte was needed, to occlude the correct portion of the background in each frame. In 1918
Frank Williams patented a travelling matte technique, again based on using a black background. This was used in many films, such as ''
The Invisible Man
''The Invisible Man'' is an 1897 science fiction novel by British writer H. G. Wells. Originally serialised in '' Pearson's Weekly'' in 1897, it was published as a novel the same year. The Invisible Man to whom the title refers is Griffin, a s ...
''.
In the 1920s,
Walt Disney
Walter Elias Disney ( ; December 5, 1901December 15, 1966) was an American animator, film producer, voice actor, and entrepreneur. A pioneer of the Golden age of American animation, American animation industry, he introduced several develop ...
used a white backdrop to include human actors with cartoon characters and backgrounds in his ''
Alice Comedies''.
From bluescreen to greenscreen
The blue screen method was developed in the 1930s at
RKO Radio Pictures
RKO Radio Pictures Inc., commonly known as RKO Pictures or simply RKO, is an American film production and distribution company, historically one of the "Big Five" film studios of Hollywood's Golden Age. The business was formed after the Kei ...
. At RKO,
Linwood Dunn used an early version of the
travelling matte
Mattes are used in photography and special effects filmmaking to combine two or more image elements into a single, final image. Usually, mattes are used to combine a foreground image (e.g. actors on a set) with a background image (e.g. a scenic ...
to create "wipes" – where there were transitions like a windshield wiper in films such as ''
Flying Down to Rio'' (1933). Credited to
Larry Butler, a scene featuring a genie escaping from a bottle was the first use of a proper bluescreen process to create a travelling matte for ''
The Thief of Bagdad'' (1940), which won the
Academy Award for Best Special Effects that year. In 1950,
Warner Brothers employee and ex-
Kodak researcher
Arthur Widmer
Arthur Widmer (July 25, 1914 in Washington, D.C. – May 28, 2006 in Los Angeles, California) was an American film special effects pioneer. He invented the "Ultra Violet Traveling matte process", an early version of what would become known as Chro ...
began working on an
ultraviolet
Ultraviolet radiation, also known as simply UV, is electromagnetic radiation of wavelengths of 10–400 nanometers, shorter than that of visible light, but longer than X-rays. UV radiation is present in sunlight and constitutes about 10% of ...
travelling matte process. He also began developing bluescreen techniques: one of the first films to use them was the
1958 adaptation of the
Ernest Hemingway
Ernest Miller Hemingway ( ; July 21, 1899 – July 2, 1961) was an American novelist, short-story writer and journalist. Known for an economical, understated style that influenced later 20th-century writers, he has been romanticized fo ...
novella, ''
The Old Man and the Sea'', starring
Spencer Tracy.
The name "Chroma-Key" was
RCA's trade name for the process, as used on its
NBC television broadcasts, incorporating patents granted to RCA's Albert N. Goldsmith. A very early broadcast use was NBC's George Gobel Show in fall 1957.
Petro Vlahos was awarded an Academy Award for his refinement of these techniques in 1964. His technique exploits the fact that most objects in real-world scenes have a colour whose blue-colour component is similar in intensity to their green-colour component.
Zbigniew Rybczyński also contributed to bluescreen technology. An
optical printer with two projectors, a film camera and a "beam splitter", was used to combine the actor in front of a blue screen together with the background footage, one frame at a time. In the early 1970s, American and British television networks began using green backdrops instead of blue for their newscasts. During the 1980s,
minicomputer
A minicomputer, or colloquially mini, is a type of general-purpose computer mostly developed from the mid-1960s, built significantly smaller and sold at a much lower price than mainframe computers . By 21st century-standards however, a mini is ...
s were used to control the optical printer. For the film ''
The Empire Strikes Back'',
Richard Edlund created a "quad optical printer" that accelerated the process considerably and saved money. He received a special
Academy Award
The Academy Awards, commonly known as the Oscars, are awards for artistic and technical merit in film. They are presented annually by the Academy of Motion Picture Arts and Sciences (AMPAS) in the United States in recognition of excellence ...
for his innovation.
For decades, travelling matte shots had to be done "locked-down", so that neither the matted subject nor the background could shift their camera perspective at all. Later, computer-timed,
motion-control cameras alleviated this problem, as both the foreground and background could be filmed with the same camera moves.
Meteorologists on television often use a field monitor, to the side of the screen, to see where they are putting their hands against the background images. A newer technique is to project a faint image onto the screen.
Some films make heavy use of chroma key to add backgrounds that are constructed entirely using
computer-generated imagery
Computer-generated imagery (CGI) is a specific-technology or application of computer graphics for creating or improving images in Digital art, art, Publishing, printed media, Training simulation, simulators, videos and video games. These images ...
(CGI). Performances from different takes can be composited together, which allows actors to be filmed separately and then placed together in the same scene. Chroma key allows performers to appear to be in any location without leaving the studio.
Advances in computer technology have simplified the
incorporation of motion into composited shots, even when using handheld cameras. Reference points such as a painted grid, X's marked with tape, or equally spaced tennis balls attached to the wall, can be placed onto the coloured background to serve as markers. In post-production, a computer can use these markers to compute the camera's position and thus render an image that matches the perspective and movement of the foreground perfectly. Modern advances in software and computational power have eliminated the need to accurately place the markers — the software figures out their position in space; a potential disadvantage of this is that it requires camera movement, possibly contributing to modern
cinematographic techniques whereby the camera is always in motion.
Process

The principal subject is filmed or photographed against a background consisting of a single colour or a relatively narrow range of colours, usually blue or green because these colours are considered to be the furthest away from skin tone.
The portions of the video which match the pre-selected colour are replaced by the alternate background video. This process is commonly known as "
keying", "keying out" or simply a "key".
Processing a green backdrop
Green is used as a backdrop for TV and electronic cinematography more than any other colour because television weather presenters tended to wear blue suits. When chroma keying first came into use in television production, the blue screen that was then the norm in the movie industry was used out of habit, until other practical considerations caused the television industry to move from blue to green screens. Broadcast-quality colour television cameras use separate red, green, and blue image sensors, and early analog TV chroma keyers required RGB component video to work reliably. From a technological perspective it was equally possible to use the blue or green channel, but because blue clothing was an ongoing challenge, the green screen came into common use. Newscasters sometimes forget the chroma key dress code, and when the key is applied to clothing of the same colour as the background, the person would seem to disappear into the key. Because green clothing is less common than blue, it soon became apparent that it was easier to use a green matte screen than it was to constantly police the clothing choices of on-air talent. Also, because the human eye is more sensitive to green wavelengths, which lie in the middle of the visible light spectrum, the green analog video channel typically carried more signal strength, giving a better signal to noise ratio compared to the other component video channels, so green screen keys could produce the cleanest key. In the digital television and cinema age, much of the tweaking that was required to make a good quality key has been automated. However, the one constant that remains is some level of colour coordination to keep foreground subjects from being keyed out.
Processing a blue backdrop
Before electronic chroma keying, compositing was done on (chemical) film. The camera colour negative was printed onto high-contrast black and white negative, using either a filter or the high contrast film's colour sensitivity to expose only blue (and higher) frequencies. Blue light only shines through the colour negative where there is ''not'' blue in the scene, so this left the film clear where the blue screen was, and opaque elsewhere, except it also produced clear for any white objects (since they also contained blue). Removing these spots could be done by a suitable double-exposure with the colour positive (thus turning any area containing red or green opaque), and many other techniques. The result was film that was clear where the blue screen was, and opaque everywhere else. This is called a ''female matte'', similar to an ''
alpha matte'' in digital keying. Copying this film onto another high-contrast negative produced the opposite ''male matte''. The background negative was then packed with the female matte and exposed onto a final strip of film, then the camera negative was packed with the male matte and was double-printed onto this same film. These two images combined creates the final effect.
Major factors
The most important factor for a key is the colour separation of the foreground (the subject) and background (the screen) – a blue screen will be used if the subject is predominantly green (for example plants), despite the camera being more sensitive to green light.
In
analog television
Analog television is the original television technology that uses analog signals to transmit video and audio. In an analog television broadcast, the brightness, colors and sound are represented by amplitude, instantaneous phase and frequency, ...
, colour is represented by the phase of the chroma
subcarrier relative to a reference oscillator. Chroma key is achieved by comparing the phase of the video to the phase corresponding to the pre-selected colour. In-phase portions of the video are replaced by the alternate background video.
In
digital colour TV, colour is represented by three numbers (red, green, blue intensity levels). Chroma key is achieved by a simple numerical comparison between the video and the pre-selected colour. If the colour at a particular point on the screen matches (either exactly, or in a range), then the video at that point is replaced by the alternate background.
Lighting
In order to create an illusion that characters and objects filmed are present in the intended background scene, the lighting in the two scenes must be a reasonable match. For outdoor scenes, overcast days create a diffuse, evenly coloured light which can be easier to match in the studio, whereas direct sunlight needs to be matched in both direction and overall colour based on time of day.
A studio shot taken in front of a green screen will naturally have ambient light the same colour as the screen, due to its light scattering. This effect is known as ''spill''.
This can look unnatural or cause portions of the characters to disappear, so must be compensated for, or avoided by using a larger screen placed far from the actors.
Camera
The depth of field used to record the scene in front of the coloured screen should match that of the background. This can mean recording the actors with a larger depth of field than normal.
Clothing
A chroma key subject must avoid wearing clothes which are similar in colour to the chroma key colour(s) (unless intentional e.g., wearing a green top to make it appear that the subject has no body), because the clothing may be replaced with the background image/video. An example of intentional use of this is when an actor wears a blue covering over a part of his body to make it invisible in the final shot. This technique can be used to achieve an effect similar to that used in the ''
Harry Potter
''Harry Potter'' is a series of seven Fantasy literature, fantasy novels written by British author J. K. Rowling. The novels chronicle the lives of a young Magician (fantasy), wizard, Harry Potter (character), Harry Potter, and his friends ...
'' films to create the effect of an
invisibility cloak. The actor can also be filmed against a chroma-key background and inserted into the background shot with a distortion effect, in order to create a cloak that is marginally detectable.
Difficulties emerge with blue screen when a costume in an effects shot must be blue, such as
Superman
Superman is a superhero created by writer Jerry Siegel and artist Joe Shuster, which first appeared in the comic book ''Action Comics'' Action Comics 1, #1, published in the United States on April 18, 1938.The copyright date of ''Action Comics ...
's traditional blue outfit. In the 2002 film ''
Spider-Man
Spider-Man is a superhero in American comic books published by Marvel Comics. Created by writer-editor Stan Lee and artist Steve Ditko, he first appearance, first appeared in the anthology comic book ''Amazing Fantasy'' #15 (August 1962) in ...
'', in scenes where both
Spider-Man
Spider-Man is a superhero in American comic books published by Marvel Comics. Created by writer-editor Stan Lee and artist Steve Ditko, he first appearance, first appeared in the anthology comic book ''Amazing Fantasy'' #15 (August 1962) in ...
and the
Green Goblin
The Green Goblin is the alias of several supervillains appearing in American comic books published by Marvel Comics. Created by writer Stan Lee and artist Steve Ditko, the first and best-known incarnation of the Green Goblin is Norman Osborn, ...
are in the air, Spider-Man had to be shot in front of a green screen and the Green Goblin had to be shot in front of a blue screen. The colour difference is because Spider-Man wears a costume which is red and blue in colour and the Green Goblin wears a costume which is entirely green in colour. If both were shot in front of the same screen, parts of one character would be erased from the shot.
For a clean division of foreground from background, it is also important that clothing and hair in the foreground shot have a fairly simple silhouette, as fine details such as frizzy hair may not resolve properly. Similarly, partially transparent elements of the costume cause problems.
Background colour
Blue
Blue is one of the three primary colours in the RYB color model, RYB colour model (traditional colour theory), as well as in the RGB color model, RGB (additive) colour model. It lies between Violet (color), violet and cyan on the optical spe ...
was originally used for the film industry as making the separations required a film that would only respond to the screen colour, and film that responded only to blue and higher frequencies (ultraviolet, etc.) was far easier to manufacture and make reliable than film that somehow excluded both frequencies higher and lower than the screen colour.
In television and digital film making, however, it is equally easy to extract any colour, and green quickly became the favoured colour. Bright green is less likely to be in the foreground objects, colour film emulsions usually had much finer grain in the green, and
lossy compression used for analog video signals and digital images and movies retain more detail in the green channel. Green can also be used outdoors where the light colour temperature is significantly blue. Red is avoided as it is in human skin, and any other colour is a mix of primaries and thus produces a less clean extraction.
A so-called "
yellow screen" is accomplished with a white backdrop. Ordinary stage lighting is used in combination with a bright yellow sodium lamp. The sodium light falls almost entirely in a narrow frequency band, which can then be separated from the other light using a prism, and projected onto a separate but synchronized film carrier within the camera. This second film is high-contrast black and white, and is processed to produce the matte.
A newer technique is to use a
retroreflective curtain in the background, along with a ring of bright
LEDs around the
camera lens
A camera lens, photographic lens or photographic objective is an optical lens (optics), lens or assembly of lenses (compound lens) used in conjunction with a camera body and mechanism to Imaging, make images of objects either on photographic film ...
. This requires no light to shine on the background other than the LEDs, which use an extremely small amount of power and space unlike big
stage lights, and require no
rigging
Rigging comprises the system of ropes, cables and chains, which support and control a sailing ship or sail boat's masts and sails. ''Standing rigging'' is the fixed rigging that supports masts including shrouds and stays. ''Running rigg ...
. This advance was made possible by the invention in the 1990s of practical blue LEDs, which also allow for
emerald green LEDs.
There is also a form of colour keying that uses light spectrum invisible to human eye. Called Thermo-Key, it uses
infrared
Infrared (IR; sometimes called infrared light) is electromagnetic radiation (EMR) with wavelengths longer than that of visible light but shorter than microwaves. The infrared spectral band begins with the waves that are just longer than those ...
as the key colour, which would not be replaced by background image during
postprocessing.
For ''
Star Trek: The Next Generation'', an
ultraviolet light matting process was proposed by Don Lee of CIS Hollywood and developed by
Gary Hutzel and the staff of
Image G. This involved a
fluorescent orange backdrop which made it easier to generate a holdout
matte, thus allowing the effects team to produce effects in a quarter of the time needed for other methods.
In principle, any type of still background can be used as a chroma key instead of a solid colour. First the background is captured without actors or other foreground elements; then the scene is recorded. The image of the background is used to cancel the background in the actual footage; for example in a digital image, each pixel will have a different chroma key. This is sometimes referred to as a ''difference matte''. However, this makes it easy for objects to be accidentally removed if they happen to be similar to the background, or for the background to remain due to camera noise or if it happens to change slightly from the reference footage. A background with a repeating pattern alleviates many of these issues, and can be less sensitive to wardrobe colour than solid-colour backdrops.
There is some use of the specific full-intensity
magenta
Magenta () is a purple-red color. On color wheels of the RGB color model, RGB (additive) and subtractive color, CMY (subtractive) color models, it is located precisely midway between blue and red. It is one of the four colors of ink used in colo ...
colour in digital colour images to encode (1-bit) transparency; this is sometimes referred to as "magic pink". This is not a photographic technique, and the extraction of the foreground from the background is trivial.
Tolerances
Even lighting

The biggest challenge when setting up a blue screen or green screen is even lighting and the avoidance of
shadow
A shadow is a dark area on a surface where light from a light source is blocked by an object. In contrast, shade occupies the three-dimensional volume behind an object with light in front of it. The cross-section of a shadow is a two-dimensio ...
because it is best to have as narrow a colour range as possible being replaced. A shadow would present itself as a darker colour to the camera and might not register for replacement. This can sometimes be seen in low-budget or live broadcasts where the errors cannot be manually repaired or scenes reshot. The material being used affects the quality and ease of having it evenly lit. Materials which are shiny will be far less successful than those that are not. A shiny surface will have areas that reflect the lights making them appear pale, while other areas may be darkened. A matte surface will diffuse the reflected light and have a more even colour range. In order to get the cleanest key from shooting green screen, it is necessary to create a value difference between the subject and the green screen. In order to differentiate the subject from the screen, a two-stop difference can be used, either by making the green screen two stops higher than the subject, or vice versa.
Sometimes a shadow can be used to create a visual effect. Areas of the blue screen or green screen with a shadow on them can be replaced with a darker version of the desired background video image, making it look like the person is casting a shadow on them. Any spill of the chroma key colour will make the result look unnatural. A difference in the
focal length
The focal length of an Optics, optical system is a measure of how strongly the system converges or diverges light; it is the Multiplicative inverse, inverse of the system's optical power. A positive focal length indicates that a system Converge ...
of the lenses used can affect the success of chroma key.
Exposure
Another challenge for blue screen or green screen is proper
camera exposure. Underexposing or overexposing a coloured backdrop can lead to poor
saturation levels. In the case of video cameras, underexposed images can contain high amounts of
noise
Noise is sound, chiefly unwanted, unintentional, or harmful sound considered unpleasant, loud, or disruptive to mental or hearing faculties. From a physics standpoint, there is no distinction between noise and desired sound, as both are vibrat ...
, as well. The background must be bright enough to allow the camera to create a bright and saturated image.
Programming
There are several different quality- and speed-optimised techniques for implementing colour keying in software.
In most versions, a function (, , ) → is applied to every pixel in the image. (alpha) has a meaning similar to that in
alpha compositing
In computer graphics, alpha compositing or alpha blending is the process of combining one image with a background to create the appearance of partial or full transparency. It is often useful to render picture elements (pixels) in separate pass ...
techniques. ≤ 0 means the pixel is fully in the green screen, ≥ 1 means the pixel is fully in the foreground object, and intermediate values indicate the pixel is partially covered by the foreground object (or it is transparent). A further function (, ''g'', ''b'') → (, ''g'', ''b'') is needed to remove green spill on the foreground objects.
A very simple () function for green screen is (+''b'') − where and are user adjustable constants with a default value of 1.0. A very simple () is (''r'', min(''g'',''b''), ''b''). This is fairly close to the capabilities of analog and film-based screen pulling.
Modern examples
of these functions are best described by two closed nested surfaces in 3D RGB space, often quite complex. Colours inside the inner surface are considered green screen. Colours outside the outer surface are opaque foreground. Colours between the surfaces are partially covered, they are more opaque the closer they are to the outer surface. Sometimes more closed surfaces are used to determine how to remove green spill. It is also very common for () to depend on more than just the current pixel's colour, it may also use the (''x'', ''y'') position, the values of nearby pixels, the value from reference images or a statistical colour model of the scene,
and values from user-drawn masks. These produce closed surfaces in space with more than three dimensions.
A different class of algorithm tries to figure out a 2D path that separates the foreground from the background. This path can be the output, or the image can be drawn by filling the path with = 1 as a final step. An example of such an algorithm is the use of
active contour. Most research in recent years has been into these algorithms.
See also
*
Compositing
*
DaVinci Resolve
DaVinci Resolve is a proprietary color grading, color correction, visual effects, and audio post-production video editing application for macOS, Windows, and Linux, developed by Australian company Blackmagic Design. It was originally deve ...
* ''
Drew Carey's Green Screen Show''
*
Federal Standard 1037C
*
Filmmaking
Filmmaking or film production is the process by which a Film, motion picture is produced. Filmmaking involves a number of complex and discrete stages, beginning with an initial story, idea, or commission. Production then continues through screen ...
*
Film production
Filmmaking or film production is the process by which a Film, motion picture is produced. Filmmaking involves a number of complex and discrete stages, beginning with an initial story, idea, or commission. Production then continues through screen ...
*
Front projection effect
*
Live action
Live action is a form of cinematography or videography that uses photography instead of animation. Some works combine live action with animation to create a live-action animated feature film. Live action is used to define film, video games o ...
*
Live action/Animation
*
Matte (filmmaking)
Mattes are used in photography and special effects filmmaking to combine two or more image elements into a single, final image. Usually, mattes are used to combine a foreground image (e.g. actors on a set) with a background image (e.g. a scenic ...
*
Motion control photography
*
Muslin
*
Optical printer
*
Primatte chromakey technology
*
Rear projection effect
*
Reverse bluescreen
Reverse bluescreen is a visual effects technique pioneered by Jonathan Erland of Apogee Inc., John Dykstra's company, for shooting the flying sequences in the 1982 film ''Firefox (film), Firefox'', directed by Clint Eastwood. Its objective is to ...
*
Schüfftan process
*
Signal processing
Signal processing is an electrical engineering subfield that focuses on analyzing, modifying and synthesizing ''signals'', such as audio signal processing, sound, image processing, images, Scalar potential, potential fields, Seismic tomograph ...
*
Sodium vapor process
*
Special effects
*
Video switcher
*
Virtual set
References
External links
How Blue Screens WorkStargate Studios Virtual Backlot Reel 2009 – A demonstration of green screen scenesChromaKey SourceCode
{{colour topics
Cinematic techniques
Film and video technology
Television terminology
Film and video terminology