This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The stop-color attribute indicates what color to use at a gradient stop.
Note: With respect to gradients, SVG treats the transparent keyword differently than CSS. SVG does not calculate gradients in pre-multiplied space, so transparent really means transparent black. So, specifying a stop-color with the value transparent is equivalent to specifying a stop-color with the value black and a stop-opacity with the value 0.
Note: As a presentation attribute, stop-color also has a CSS property counterpart: stop-color. When both are specified, the CSS property takes priority.
You can use this attribute with the following SVG elements:
| Value | <color> |
|---|---|
| Default value | black |
| Animatable | Yes |
<color>This value indicates a color value.
| Specification |
|---|
| Scalable Vector Graphics (SVG) 2> # StopColorProperty> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
stop-color |
1 | 12 | 1.5 | 9 | 3 | 18 | 4 | 10.1 | 3 | 1.0 | 3 | 3 |
stop-color propertystop-opacity
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/stop-color