preserveAlpha
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
the preserveAlpha attribute indicates how a <feConvolveMatrix> element handles alpha transparency.
You can use this attribute with the following SVG elements:
Example
Usage notes
| Default value | false |
|---|---|
| Value | true | false |
| Animatable | Yes |
true-
This value indicates that the convolution is applied only to the color channels. In this case, the filter temporarily removes alpha premultiplication from the color component values, applies the kernel, and then reapplies alpha premultiplication as a final step.
false-
This value indicates that the convolution is applied to all channels, including the alpha channel.
Specifications
| Specification |
|---|
| Filter Effects Module Level 1 # element-attrdef-feconvolvematrix-preservealpha |