Skip to content

Commit 8fd1428

Browse files
committed
Added CSS color-interpolation-filters property
1 parent 942bbbe commit 8fd1428

File tree

2 files changed

+65
-2
lines changed
  • files/en-us/web
    • css/color-interpolation-filters
    • svg/attribute/color-interpolation-filters

2 files changed

+65
-2
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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)

files/en-us/web/svg/attribute/color-interpolation-filters/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The **`color-interpolation-filters`** attribute specifies the color space for im
1717
> It has no affect on filter functions, which operate in the {{Glossary("sRGB")}} color space.
1818
1919
> [!NOTE]
20-
> As a presentation attribute, `color-interpolation-filters` can be used as a CSS property.
20+
> As a presentation attribute, `color-interpolation-filters` can be used as a CSS property. See {{cssxref('color-interpolation-filters')}} for more.
2121
2222
You can use this attribute with the following SVG elements:
2323

@@ -76,5 +76,6 @@ You can use this attribute with the following SVG elements:
7676

7777
## See also
7878

79+
- SVG {{SVGAttr("color-interpolation")}} attribute
80+
- CSS {{cssxref('color-interpolation-filters')}} property
7981
- [sRGB specification](https://webstore.iec.ch/publication/6169)
80-
- {{SVGAttr("color-interpolation")}}

0 commit comments

Comments
 (0)