aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/svg/attribute/stop-color/index.md
blob: d4ad9b816c10f8065a668290735512ff3c826290 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
title: stop-color
slug: Web/SVG/Attribute/stop-color
tags:
  - NeedsExample
  - SVG
  - SVG 属性
browser-compat: svg.attributes.presentation.stop-color
translation_of: Web/SVG/Attribute/stop-color
---
{{SVGRef}}

**`stop-color`** 属性は、グラデーションの色停止点で使用する色を示します。

> **Note:** グラデーションに関して、SVG は `transparent` キーワードを CSS とは異なる方法で扱います。SVG はグラデーションを事前に乗算された空間で計算しないので、`transparent` は実際には透明な黒を意味します。そのため、`stop-color` に `transparent` という値を指定することは、`stop-color` に `black` という値を指定し、{{SVGAttr("stop-opacity")}} に `0` という値を指定することと同じです。

> **Note:** プレゼンテーション属性である `stop-color` は、CSS プロパティとして使用することができます。

この属性は以下の SVG 要素で使用することができます。

*   {{SVGElement("stop")}}

## 使用上のメモ

<table class="properties">
  <tbody>
    <tr>
      <th scope="row">値</th>
      <td>
        <code>currentcolor</code> |
        {{cssxref("color_value", "&lt;color&gt;")}}
        <code
          ><a href="/en-US/docs/Web/SVG/Content_type#icccolor"
            >&#x3C;icccolor></a
          ></code
        >
      </td>
    </tr>
    <tr>
      <th scope="row">既定値</th>
      <td><code>black</code></td>
    </tr>
    <tr>
      <th scope="row">アニメーション</th>
      <td>可</td>
    </tr>
  </tbody>
</table>

*   `currentcolor`
    *   : このキーワードは、現在の塗りつぶしの色を表し、 [`<paint>`](/en-US/docs/Web/SVG/Content_type#paint) の指定の中で、{{SVGAttr("fill")}} および {{SVGAttr("stroke")}} 属性と同じ方法で指定することができます。
*   `<color>`
    *   : この値は色の値を示します。
*   `<icccolor>`
    *   : この値は ICC カラープロファイルを参照します。

## 仕様書

<table class="no-markdown">
  <thead>
    <tr>
      <th scope="col">仕様書</th>
      <th scope="col">状態</th>
      <th scope="col">備考</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        {{SpecName("SVG2", "pservers.html#StopColorProperty", "stop-color")}}
      </td>
      <td>{{Spec2("SVG2")}}</td>
      <td>
        SVG では <code>transparent</code> キーワードが CSS とは異なる扱いになるというメモを追加。
      </td>
    </tr>
    <tr>
      <td>
        {{SpecName("SVG1.1", "pservers.html#StopColorProperty", "stop-color")}}
      </td>
      <td>{{Spec2("SVG1.1")}}</td>
      <td>初回定義</td>
    </tr>
  </tbody>
</table>

## ブラウザーの互換性

{{Compat}}

## 関連情報

*   {{SVGAttr("stop-opacity")}}