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 2015.

Die color-interpolation-filters CSS-Eigenschaft spezifiziert den Farbraum für Bildgebungsoperationen, die über SVG-Filtereffekte durchgeführt werden. Wenn explizit deklariert, überschreibt der Wert der CSS-Eigenschaft jeden Wert, der im Attribut color-interpolation-filters des Elements angegeben ist.

Hinweis: Die color-interpolation-filters-Eigenschaft bezieht sich nur auf SVG-Filteroperationen. Sie hat keine Auswirkung auf Filterprimitive wie <feOffset>, <feImage>, <feTile> und <feFlood>, sondern gilt stattdessen für die verschiedenen Filtereffektelemente (z.B. <feBlend>); siehe die SVG-color-interpolation-filters-Seite für eine vollständige Liste.

Hinweis: Es ist wichtig zu beachten, dass das SVG-Attribut color-interpolation einen Anfangswert von sRGB hat, während color-interpolation-filters einen Anfangswert von linearRGB hat. Das bedeutet, dass im Standardfall Filtereffektinterpolationen in einem anderen Farbraum stattfinden als alle anderen Farbinterpolationen.

Syntax

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

/* Global values */
color-interpolation-filters: inherit;
color-interpolation-filters: initial;
color-interpolation-filters: revert;
color-interpolation-filters: revert-layer;
color-interpolation-filters: unset;

Werte

linearRGB

Gibt an, dass die Farbintepolation im linearisierten RGB-Farbraum erfolgen sollte, wie in der sRGB-Spezifikation beschrieben. Dies ist der Standardwert der Eigenschaft.

sRGB

Gibt an, dass die Farbintepolation im gamma-kodierten sRGB-Farbraum erfolgen sollte.

auto

Gibt an, dass der Benutzeragent entweder die sRGB- oder linearRGB-Räume für die Farbintepolation wählen kann. Diese Option zeigt an, dass der Autor nicht verlangt, dass die Farbintepolation in einem bestimmten Farbraum erfolgt.

Formale Definition

AnfangswertlinearRGB
Anwendbar aufThe set of elements that control the output of a <filter> element in <svg>
VererbtJa
Berechneter Wertwie angegeben
Animationstypdiskret

Formale Syntax

color-interpolation-filters = 
auto |
sRGB |
linearRGB

Spezifikationen

Specification
Filter Effects Module Level 1
# ColorInterpolationFiltersProperty

Browser-Kompatibilität

Siehe auch