color-interpolation-filters
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2020.
The color-interpolation-filters attribute specifies the color space for imaging operations performed via filter effects.
Note:
This property just has an affect on filter operations. Therefore, it has no effect on filter primitives like <feOffset>, <feImage>, <feTile> or <feFlood>.
color-interpolation-filters has a different initial value than color-interpolation. color-interpolation-filters has an initial value of linearRGB, whereas color-interpolation has an initial value of sRGB. Thus, in the default case, filter effects operations occur in the linearRGB color space, whereas all other color interpolations occur by default in the sRGB color space.
It has no affect on filter functions, which operate in the sRGB color space.
Note:
As a presentation attribute, color-interpolation-filters also has a CSS property counterpart: color-interpolation-filters. When both are specified, the CSS property takes priority.
You can use this attribute with the following SVG elements:
Usage notes
| Value | auto | sRGB | linearRGB |
|---|---|
| Default value | linearRGB |
| Animatable | discrete |
auto-
Indicates that the user agent can choose either the
sRGBorlinearRGBspaces for color interpolation. This option indicates that the author doesn't require that color interpolation occur in a particular color space. sRGB-
Indicates that color interpolation should occur in the sRGB color space.
linearRGB-
Indicates that color interpolation should occur in the linearized RGB color space as described in the sRGB specification.
Specifications
| Specification |
|---|
| Filter Effects Module Level 1> # ColorInterpolationFiltersProperty> |
Browser compatibility
Loading…
See also
- SVG
color-interpolationattribute - CSS
color-interpolation-filtersproperty - sRGB specification