color-interpolation - SVG: Scalable Vector Graphics 编辑

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

Note: For filter effects, the color-interpolation-filters property controls which color space is used.

The color-interpolation property chooses between color operations occurring in the sRGB color space or in a (light energy linear) linearized RGB color space. Having chosen the appropriate color space, component-wise linear interpolation is used.

When a child element is blended into a background, the value of the color-interpolation property 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 href or the deprecated xlink:href attribute to reference another gradient, the gradient uses the propertyʼs value from the gradient element which is directly referenced by the fill or stroke property. When animating colors, color interpolation is performed according to the value of the color-interpolation property on the element being animated.

Note: As a presentation attribute, color-interpolation can be used as a CSS property.

As a presentation attribute, it can be applied to any element but it only has an effect on the following 29 elements: <a>, <animate>, <animateColor>, <circle>, <clipPath>, <defs>, <ellipse>, <foreignObject>, <g>, <glyph>, <image>, <line>, <linearGradient>, <marker>, <mask>, <missing-glyph>, <path>, <pattern>, <polygon>, <polyline>, <radialGradient>, <rect>, <svg>, <switch>, <symbol>, <text>, <textPath>, <tspan>, and <use>

Usage notes

Valueauto | sRGB | linearRGB
Default valuesRGB
Animatablediscrete
auto
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.
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

SpecificationStatusComment
Scalable Vector Graphics (SVG) 2
The definition of 'color-interpolation' in that specification.
Candidate RecommendationNo significant change
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'color-interpolation' in that specification.
RecommendationInitial definition

Browser compatibility

BCD tables only load in the browser

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:129 次

字数:6945

最后编辑:7 年前

编辑次数:0 次

我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文