Premium apps Part of Lumina

Chroma Key: Green Screen to Transparent PNG

Key out a green or blue screen into a transparent PNG with spill suppression.

Above 1 removes more of the screen (also from greenish foreground); below 1 keeps more.

More options

Matte values below this become fully transparent (cleans noisy screens).

Matte values above this become fully opaque (fills holes in the subject).

Weight of the first other channel in the colour difference (red for green and blue screens).

Try an example: Synthetic green-screen plate with automatic screen colour · Explicit screen colour, clipped and softened matte

More about this tool

How it works

Removes a green, blue or any strongly coloured backing from a photo with a colour-difference keyer, un-mixes the backing colour from soft edges, suppresses spill and returns an RGBA PNG plus the matte. The screen colour is picked from the image border automatically or entered as HEX.

  • Colours are decoded to linear light. The matte is a balanced colour difference m(C) = C_dominant − (b·C_other1 + (1 − b)·C_other2) of the screen colour’s dominant channel, and α = 1 − gain·m(C)/m(screen), remapped between clip black and clip white.
  • For a foreground mixed with the screen, C = α·F + (1 − α)·K, the matte is linear in α, so α is recovered exactly for foreground colours with m(F) = 0 (greys, whites, many skin tones) and clamped for others. The screen colour is then removed from edge pixels (premultiplied α·F = C − (1 − α)·K) and remaining spill is limited to the balanced mix of the other channels.
  • Optional shrink (square erosion) and edge softening (Gaussian) act on the matte. Same engine as the Chroma key node in Lumina’s Compositor.

Colour-difference keying needs an evenly lit screen; strongly green or blue foreground objects become partly transparent. For general photos without a screen use the background remover instead.

Sources

Part of Lumina

  • Lumina Photo editor & image toolkit

    Bring out what you saw. A free photo studio, right in your browser.

    Open Lumina

Related tools

How to use the Chroma Key tool

Turn a green- or blue-screen photo into a transparent PNG with spill suppression, tune the matte and read the transparency report.

What it is for

Shooting in front of a green or blue screen makes cutting out a subject a matter of colour: everything that looks like the screen becomes transparent. This tool does that for one photo and returns an RGBA PNG plus the matte (white = kept, black = removed) as a separate grey image.

It is a colour-difference keyer: it measures how much more of the screen's dominant channel a pixel has than of the other two, compares that with the screen colour itself, and turns the ratio into transparency. Soft edges such as hair are then un-mixed — the screen colour is subtracted from them — and remaining green spill is limited. It is not an AI background remover: a photo without a coloured screen will not key well, and the tool warns you when the screen colour is weak.

Worked example

The first example uses a synthetic green-screen plate (192 × 128 pixels, generated by Lumina) with the screen colour on auto. The tool picked #00B140 from the image border and reported 70.42 % transparent pixels, 4.32 % soft edge and 25.26 % opaque. That matches the plate: a head-and-shoulders figure with anti-aliased edges on a flat screen.

The second example enters the colour by hand and cleans the matte: clip black 0.05, clip white 0.95, shrink 1 px and soften 0.8 px. The opaque share drops to 24.01 % because the shrink eats one pixel around the figure, and the soft edge grows to 5.49 % because of the blur.

Raising the screen gain to 1.3 on the first plate removes the screen more aggressively: 70.81 % transparent, 4.26 % soft, 24.93 % opaque. On a landscape photo without any screen, auto picked a grey-green #9CA791, keyed half of the picture into a soft edge (51.33 %) and the tool warned that the screen colour is not clearly green, blue or red.

How to read the result

  • Screen colour is the colour that was keyed; with auto it is the median of the opaque border pixels.
  • Transparent, soft edge and opaque add up to 100 %. A large soft-edge share on a studio shot usually means uneven lighting or a gain that is too low.
  • The matte download shows exactly which pixels are kept; grey areas inside the subject are holes you can close with clip white.

Tips and common mistakes

  • Light the screen evenly and keep the subject a metre or two away from it; shadows and green bounce light make the key harder.
  • Raise clip black a little when the screen shows noise or creases, and lower clip white when the subject has see-through holes.
  • Green clothing or green objects in front of a green screen will turn transparent. Use a blue screen for green subjects.
  • Balance shifts the weight between the two other channels; move it when skin tones or blond hair key unevenly.
  • Shrink by one or two pixels before softening to remove a thin outline of the screen.

FAQ

What happens to green spill on the subject?

Edge pixels are un-mixed so the screen colour no longer shines through, and the dominant screen channel is limited to the balanced mix of the other two. Set spill suppression to 0 to keep the original colours.

Does it work with blue screens?

Yes. The keyer uses the dominant channel of whatever screen colour you give or auto-picks, so blue and even red screens work the same way.

Can I put the result on a new background?

Download the PNG and place it anywhere, or use the lumina-compositor tool or Lumina's Compositor, whose green-screen preset keys and merges in one go.

How accurate is the transparency?

On a synthetic plate with known transparency, the recovered alpha differs by 0.0002 on average and at most about 0.016 — close to the 8-bit rounding limit. Real footage depends on lighting and compression.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://luminachromakey.usefulweb.app/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://luminachromakey.usefulweb.app/mcp · tool name lumina_chroma_key
Example request
curl -s -X POST https://luminachromakey.usefulweb.app/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{…see OpenAPI examples…}'
Feedback · ideas & bug reports welcome