-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
64 lines (49 loc) · 1.78 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: stop-color
slug: Web/SVG/Attribute/stop-color
page-type: svg-attribute
browser-compat: svg.global_attributes.stop-color
---
{{SVGRef}}
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 {{SVGAttr("stop-opacity")}} with the value `0`.
> **Note:** As a presentation attribute, `stop-color` can be used as a CSS property.
You can use this attribute with the following SVG elements:
- {{SVGElement("stop")}}
## Usage notes
<table class="properties">
<tbody>
<tr>
<th scope="row">Value</th>
<td>
<code>currentcolor</code> |
{{cssxref("color_value", "<color>")}}
<code
><a href="/en-US/docs/Web/SVG/Content_type#icccolor"
><icccolor></a
></code
>
</td>
</tr>
<tr>
<th scope="row">Default value</th>
<td><code>black</code></td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>Yes</td>
</tr>
</tbody>
</table>
- `currentcolor`
- : This keyword denotes the current fill color and can be specified in the same manner as within a [`<paint>`](/en-US/docs/Web/SVG/Content_type#paint) specification for the {{SVGAttr("fill")}} and {{SVGAttr("stroke")}} attributes.
- `<color>`
- : This value indicates a color value.
- `<icccolor>`
- : This value refers to an ICC color profile.
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{SVGAttr("stop-opacity")}}