Color Key Defringe
colorkey-defringe
The colorkey-defringe parameter cleans up the subject’s edges after a colorkey, so a light or tinted halo from the old background does not show against a new one. It accepts a value from 0 (off) to 1 (full strength). It has no effect without colorkey.
What it does depends on colorkey-mode:
- Color mode (default
1): partly transparent edge pixels have the key color removed from them, leaving the subject’s own color at the edge’s transparency. Fully opaque pixels are not changed. - Chroma mode (default
0.5): reduces any tint toward the key color across the image, such as green light reflected onto a subject from a green screen. Colors that do not lean toward the key, such as skin tones, are not changed. With a gray, white or black key there is no tint to remove, so it has no effect.
Pixels that are fully opaque but still mixed with the background, typically a one-pixel line on edges that were already soft in the source, are outside the feather range and are not changed by defringing.
colorkeydefringe is accepted as an alias.
Defringing only touches the partly transparent pixels along an edge, so it is a fine correction rather than a dramatic one — look closely at the edges rather than the image as a whole. It shows up best on a saturated key composited over a contrasting background, which is where a leftover tint would otherwise be obvious. In the pair below a green screen is keyed in chroma mode and composited onto a dark bg: at colorkey-defringe=0 the white lettering keeps a faint green edge, and at 1 that tint is gone.