SVG <feComposite> Filter

Last Updated:

What is <feComposite> Filter?

The <feComposite> SVG filter primitive performs the combination of two input images pixel-wise in image space using one of the Porter-Duff compositing operations: over, in, atop, out, xor, and lighter.


HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <body> <svg height="100" width="200"> <filter id="point" y="0" x="0" width="100%" height="100%"> <feTurbulence baseFrequency=".05" numOctaves="3" result="B"/> <feComposite in2="B" in="SourceGraphic" operator="in" /> </filter> <rect width="200" height="100" style="fill:green" filter="url(#point)"/> </svg> </body> </html>

Attributes Value

in Specifies the input for the given filter primitive.
in2 Specifies the second input for the given filter primitive.
operator Specifies the compositing operation that is to be performed.

Share this Page

Meet the Author