CSS flood-opacity Property
Description
The flood-opacity property controls the transparency of the color produced by an SVG flood filter primitive (the paint that a flood produces) before that paint is composited into the rest of the filter chain. It governs how much of the flood color contributes to the filter output, effectively determining the strength of a uniform color fill used inside filter effects. Because it applies to the flood source itself, it does not change the opacity of the host element or other filter sources — only the generated flood paint.
In practice flood-opacity is used together with the flood color to shape the visual effect: you typically choose a hue with the flood color and then use flood-color to pick the tint and flood-opacity to dial how strongly that tint shows through. The property’s effect is applied during the filter primitive processing and is combined by compositing or blending primitives (for example when you combine the flood with an existing image using feComposite or feBlend). This behavior contrasts with the element-wide opacity property, which alters the transparency of the entire rendered element and its children rather than just a single filter source.
Because flood-opacity affects only the filter’s generated paint, it’s especially useful for subtle, localized adjustments: adding a soft colored wash behind a shape, tinting only a shadow or glow, or creating layered color effects by chaining multiple filter primitives and controlling each source’s contribution. It is animatable, so you can animate the apparent strength of a tint or glow over time without changing the underlying color, and it interacts with other filter-level settings (such as color interpolation and subsequent compositing modes) in predictable, composited order.
Definition
- Initial value
- black
- Applies to
- <feFlood> and <feDropShadow> elements in <svg>
- Inherited
- no
- Computed value
- the specified value, clipped in the range [0,1]
- Animatable
- by computed value
- JavaScript syntax
- object.style.floodOpacity
Syntax
flood-opacity: <number>;
Values
- <number>A number between
0and1.0means fully transparent.1means fully opaque.- Values like
0.5will make the flood color semi-transparent.
Example
Browser Support
The following information will show you the current browser support for the CSS flood-opacity property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
