我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

The color-interpolation attribute specifies the color space for gradient interpolations, color animations, and alpha compositing.

When a child element is blended into a background, the value of the color-interpolation attribute on the child determines the type of blending, not the value of the color-interpolation on the parent. For gradients which make use of the xlink:href attribute to reference another gradient, the gradient uses the color-interpolation attribute value from the gradient element which is directly referenced by the fill or stroke attribute. When animating colors, color interpolation is performed according to the value of the color-interpolation attribute on the element being animated.

As a presentation attribute, it also can be used as a property directly inside a CSS stylesheet. See css color-interpolation for further information.

Usage context

Categories Presentation attribute
Value auto | sRGB | linearRGB | inherit
Animatable Yes
Normative document SVG 1.1 (2nd Edition)
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.
Indicates that color interpolation should occur in the sRGB color space.
Indicates that color interpolation should occur in the linearized RGB color space as described in the sRGB specification.



The following elements can use the color-interpolation attribute:


Specification Status Comment
Scalable Vector Graphics (SVG) 2
The definition of 'color-interpolation' in that specification.
Candidate Recommendation  
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'color-interpolation' in that specification.
Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?


Compatibility unknown  
Compatibility unknown

See also


最近更新: connorshea,