CSS color-interpolation Property
The color-interpolation property sets the color space used for SVG gradients, compositing and animations: sRGB or linearRGB.
Description
The color-interpolation property chooses the color space in which SVG gradients, compositing and animations interpolate colors. With the default sRGB colors are blended in the gamma-encoded sRGB space; with linearRGB they are blended in linear light, which gives brighter, more physically accurate midpoints, for example a red-to-green gradient that does not pass through a muddy brown.
It applies to SVG container elements, graphics elements, gradients and <animate> elements. Filter effects use the separate color-interpolation-filters property. For CSS gradients, the color space is chosen with the in keyword instead, as in linear-gradient(in oklab, red, blue).
Definition
- Initial value
- sRGB
- Applies to
- container elements, graphics elements, gradient elements, use and animate elements in SVG
- Inherited
- yes
- Computed value
- as specified
- Animatable
- discrete
- JavaScript syntax
- object.style.colorInterpolation
Interactive Demo
Syntax
color-interpolation: auto | sRGB | linearRGB;
Values
- autoThe browser may choose either color space.
- sRGBThe default. Colors are interpolated in the sRGB color space.
- linearRGBColors are interpolated in linearized RGB (linear light).
- initialSets the property to its initial value.
- inheritTakes the computed value of the parent element.
Example
Browser Support
The following information will show you the current browser support for the CSS color-interpolation property. Hover over a browser icon to see the version that first introduced support for this CSS property.
Desktop





Tablets & Mobile





