|
| 1 | +--- |
| 2 | +title: color-interpolation-filters |
| 3 | +slug: Web/CSS/color-interpolation-filters |
| 4 | +page-type: css-property |
| 5 | +browser-compat: css.properties.color-interpolation-filters |
| 6 | +--- |
| 7 | + |
| 8 | +{{CSSRef}} |
| 9 | + |
| 10 | +The **`color-interpolation-filters`** [CSS](/en-US/docs/Web/CSS) property specifies the color space for imaging operations performed via SVG filter effects. If explicitly declared, the value of the CSS property overrides any value given in the element's {{SVGAttr("color-interpolation-filters")}} attribute. |
| 11 | + |
| 12 | +> [!NOTE] |
| 13 | +> The {{SVGAttr("color-interpolation-filters")}} property is only relevant to SVG filter operations. It has _no_ effect on filter primitives like {{SVGElement("feOffset")}}, {{SVGElement("feImage")}}, {{SVGElement("feTile")}}, and {{SVGElement("feFlood")}}, but instead applies to the various filter effect elements (e.g., {{SVGElement('feBlend')}}); see the SVG {{SVGAttr('color-interpolation-filters')}} page for a full list. |
| 14 | +
|
| 15 | +> [!NOTE] |
| 16 | +> It is important to remember that the SVG {{SVGAttr('color-interpolation')}} attribute has an initial value of `sRGB`, while `color-interpolation-filters` has an initial value of `linearRGB`. This means, in the default case, filter effect interpolations occur in a different color space than all other color interpolations. |
| 17 | +
|
| 18 | +## Syntax |
| 19 | + |
| 20 | +```css |
| 21 | +color-interpolation-filters: auto; |
| 22 | +color-interpolation-filters: linearRGB; |
| 23 | +color-interpolation-filters: sRGB; |
| 24 | + |
| 25 | +/* Global values */ |
| 26 | +color-interpolation-filters: inherit; |
| 27 | +color-interpolation-filters: initial; |
| 28 | +color-interpolation-filters: revert; |
| 29 | +color-interpolation-filters: revert-layer; |
| 30 | +color-interpolation-filters: unset; |
| 31 | +``` |
| 32 | + |
| 33 | +### Values |
| 34 | + |
| 35 | +- `linearRGB` |
| 36 | + - : Indicates that color interpolation should occur in the linearized RGB color space as described in [the sRGB specification](https://webstore.iec.ch/publication/6169). This is the default property value. |
| 37 | +- `sRGB` |
| 38 | + - : Indicates that color interpolation should occur in the gamma-encoded sRGB color space. |
| 39 | +- `auto` |
| 40 | + - : Indicates that the user agent can choose either the `sRGB` or `linearRGB` spaces for color interpolation. This option indicates that the author doesn't require that color interpolation occur in a particular color space. |
| 41 | + |
| 42 | +## Formal definition |
| 43 | + |
| 44 | +{{CSSInfo}} |
| 45 | + |
| 46 | +## Formal syntax |
| 47 | + |
| 48 | +{{csssyntax}} |
| 49 | + |
| 50 | +## Specifications |
| 51 | + |
| 52 | +{{Specifications}} |
| 53 | + |
| 54 | +## Browser compatibility |
| 55 | + |
| 56 | +{{Compat}} |
| 57 | + |
| 58 | +## See also |
| 59 | + |
| 60 | +- SVG {{SVGAttr("color-interpolation-filters")}} attribute |
| 61 | +- SVG {{SVGAttr("color-interpolation")}} attribute |
| 62 | +- [sRGB specification](https://webstore.iec.ch/publication/6169) |
0 commit comments