Favorites

CSS color-interpolation-filters Property

color-interpolation-filters
CSS PropertyThis property is supported by all modern browsers.
Updated 22nd November 2026

The color-interpolation-filters property sets the color space used for SVG filter effects: sRGB or linearRGB.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

Description

The color-interpolation-filters property sets the color space used by SVG filter effects, such as <feGaussianBlur>, <feColorMatrix> or <feComposite>. Unlike most color properties, its initial value is linearRGB, so filter calculations happen in linear light by default.

Switching a filter primitive or the whole <filter> to sRGB is useful when a filter must produce exactly the same colors as CSS (for example a color matrix that should match a design token), because CSS colors and blending normally work in sRGB. It applies to filter primitives and is inherited from the <filter> element. Other SVG color operations use color-interpolation.

Definition

Initial value
linearRGB
Applies to
filter primitives in SVG
Inherited
yes
Computed value
as specified
Animatable
discrete
JavaScript syntax
object.style.colorInterpolationFilters

Interactive Demo

Demo Code
HTML Code
<svg class="demo-svg" viewBox="0 0 200 120" width="260" xmlns="http://www.w3.org/2000/svg">
<filter class="demo-element" id="demo-cif">
	<feGaussianBlur stdDeviation="8"/>
</filter>
<g filter="url(#demo-cif)">
	<rect x="20" y="30" width="55" height="60" fill="#ff0000"/>
	<rect x="75" y="30" width="55" height="60" fill="#00ff00"/>
	<rect x="130" y="30" width="55" height="60" fill="#0000ff"/>
</g>
</svg>
CSS Code
.demo-element {
	color-interpolation-filters: auto;
}

Syntax

color-interpolation-filters: auto | sRGB | linearRGB;

Values

  • autoThe browser may choose either color space.
  • sRGBFilter effects operate in the sRGB color space.
  • linearRGBThe default. Filter effects operate in linearized RGB.
  • initialSets the property to its initial value.
  • inheritTakes the computed value of the parent element.

Example

<svg viewBox="0 0 300 160">
<defs>
<filter id="f-srgb"><feGaussianBlur stdDeviation="6"/></filter>
<filter id="f-linear"><feGaussianBlur stdDeviation="6"/></filter>
</defs>
<rect x="30" y="30" width="90" height="90" fill="#f72585" filter="url(#f-srgb)"/>
<rect x="180" y="30" width="90" height="90" fill="#f72585" filter="url(#f-linear)"/>
<text x="50" y="150">sRGB</text>
<text x="190" y="150">linearRGB</text>
</svg>
svg {
  width: 300px;
  height: 160px;
  border: 1px solid #ddd;
  background: #fafbff;
}

#f-srgb {
  color-interpolation-filters: sRGB;
}

#f-linear {
  color-interpolation-filters: linearRGB;
}

text {
  font: 14px system-ui, sans-serif;
}
Open in editor

Browser Support

The following information will show you the current browser support for the CSS color-interpolation-filters 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

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.