SVG においては全ての色は sRGB 色空間( [SRGB] 参照)で指定される。 SVG-UAは、少なくとも CSS2 仕様により定められている 色単位 ( color units )と ガンマ補正 ( minimal gamma correction rules )で指定される色の振る舞いに対する要求に適合するものとする。
All SVG colors are specified in the sRGB color space (see [SRGB]). At a minimum, SVG user agents shall conform to the color behavior requirements specified in the color units section and the minimal gamma correction rules defined in the CSS2 specification.
更に、 SVG 内容では ICC プロファイル( [ICC32] 参照)を利用する代替の色指定も指定することができる。 SVG-UAが ICC 色をサポートしている場合は ICC ベースの色指定が(もし与えられているなら) sRGB 色指定より優先される。 ICC ベースの色指定が与えられたとしても色補間は RGB 色空間で行われることに注意( 'color-interpolation' プロパティを見よ)。
Additionally, SVG content can specify an alternate color specification using an ICC profile (see [ ICC32]). If ICC-based colors are provided and the SVG user agent supports ICC color, then the ICC-based color takes precedence over the sRGB color specification. Note that color interpolation occurs in an RGB color space even if an ICC-based color specification is provided (see 'color-interpolation').
'color' プロパティは、 'fill', 'stroke', 'stop-color', 'flood-color', 'lighting-color' プロパティに対し間接的に与え得る値( currentColor )を提供するために利用される。
The 'color' property is used to provide a potential indirect value (currentColor) for the 'fill', 'stroke', 'stop-color', 'flood-color', 'lighting-color' properties.
値: | <color> | inherit |
初期値: | UAに依存 |
適用対象: | 'fill', 'stroke', 'stop-color', 'flood-color', 'lighting-color' プロパティが適用される要素 |
継承: | 有り |
パーセント: | N/A |
メディア: | 視覚 |
アニメーション: | 可 |
Value: | <color> | inherit |
Initial: | depends on user agent |
Applies to: | elements to which properties 'fill', 'stroke', 'stop-color', 'flood-color', 'lighting-color' apply |
Inherited: | yes |
Percentages: | N/A |
Media: | visual |
Animatable: | yes |
この仕様で与えられる追加の情報を除き、このプロパティの正式な定義は [CSS2] で与えられる。
Except for any additional information provided in this specification, the normative definition of the property is in [ CSS2].
International Color Consortium は、入力装置と出力装置の色特性を文書化するための標準 ICC プロファイル [ICC32] を確立した。これらのプロファイルの利用により、異なる装置間にわたる変換と正確な視覚データの再現が可能になる。
The International Color Consortium has established a standard, the ICC Profile [ ICC32], for documenting the color characteristics of input and output devices. Using these profiles, it is possible to build a transform and correct visual data for viewing on different devices.
カラープロファイル記述 ( color profile description )は ICC プロファイルと SVG 内容におけるその ICC プロファイルへの参照との間の橋渡しを提供する。カラープロファイル記述は、UAが持つ既知のカラープロファイルのリストに追加され、適切なプロファイルの選択に用いられる。カラープロファイル記述は、カラープロファイルのウェブにおける場所, プロファイルの参照名, 描画インテント( rendering intent )についての情報を表す記述子を含む。
A color profile description provides the bridge between an ICC profile and references to that ICC profile within SVG content. The color profile description is added to the user agent's list of known color profiles and then used to select the relevant profile. The color profile description contains descriptors for the location of the color profile on the Web, a name to reference the profile and information about rendering intent.
カラープロファイル記述は次のいずれかの方法で指定される:
Color profile descriptions can be specified in either of the following ways:
同じ name 値のカラープロファイルが 'color-profile' 要素と CSS スタイルシート内の @color-profile 規則の両方で認識された場合、UAはまず @color-profile 規則を優先してプロファイルの特定を試みることになる。
If a color profile with the same name value has been identified by both a 'color-profile' element and @color-profile rules within a CSS style sheet, then the user agent shall first attempt to locate the profile by using the specifications in the @color-profile rules first.
<!ENTITY % SVG.color-profile.extra.content "" > <!ENTITY % SVG.color-profile.element "INCLUDE" > <![%SVG.color-profile.element;[ <!ENTITY % SVG.color-profile.content "( %SVG.Description.class; %SVG.color-profile.extra.cont\ ent; )*" > <!ELEMENT %SVG.color-profile.qname; %SVG.color-profile\ .content; > <!-- end of SVG.color-profile.element -->]]> <!ENTITY % SVG.color-profile.attlist "INCLUDE" > <![%SVG.color-profile.attlist;[ <!ATTLIST %SVG.color-profile.qname; %SVG.Core.attrib; %SVG.XLink.attrib; local CDATA #IMPLIED name CDATA #REQUIRED rendering-intent ( auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric ) 'auto' > |
属性定義:
'rendering-intent' はカラープロファイル描画インテントを既定のもの以外にすることを可能にする。 'rendering-intent' は主に CMYK 色空間に対応するカラープロファイルに適用される。それぞれの値は、描画対象の装置の色域( color gamut )に色を変換する際に用いられるそれぞれ異なる手法に対応する:
'rendering-intent' permits the specification of a color profile rendering intent other than the default. 'rendering-intent' is applicable primarily to color profiles corresponding to CMYK color spaces. The different options cause different methods to be used for translating colors to the color gamut of the target rendering device:
文書に CSS によるスタイル付けがなされている場合は、カラープロファイル記述の指定に @color-profile 規則が利用できる。総体的な書式は:
When the document is styled using CSS, the @color-profile rule can be used to specify a color profile description. The general form is:
@color-profile { <color-profile-description> }
ここで <color-profile-description> の書式は:
where the <color-profile-description> has the form:
記述子: 値; [...] 記述子: 値;
descriptor: value; [...] descriptor: value;
それぞれの @color-profile 規則は全てのカラープロファイル記述子に対する値を暗黙的または明示的に指定する。規則において明示的に値が与えられていない記述子はこの仕様で挙げられている各記述子の初期値をとる。これらの記述子は単にこれらが定義された @color-profile 規則の文脈において適用されるものであり、文書言語の枠組みにおいて要素に適用されるものではない。したがって、どの要素に記述子が適用されるか、あるいは子要素への値の継承というような概念は存在しない。
Each @color-profile rule specifies a value for every color profile descriptor, either implicitly or explicitly. Those not given explicit values in the rule take the initial value listed with each descriptor in this specification. These descriptors apply solely within the context of the @color-profile rule in which they are defined, and do not apply to document language elements. Thus, there is no notion of which elements the descriptors apply to, or whether the values are inherited by child elements.
以下は <color-profile-description> の記述子である:
The following are the descriptors for a <color-profile-description>:
"local(" + <string> + ")"ここで <string> は International Color Consortium により定められたプロファイルの識別 ID である。(注意:プロファイル記述フィールドは、プロファイルの識別 ID を表現するわけではない 。現在の ICC 提案では、プロファイルの識別 ID はプロファイルヘッダの MD5 エンコード値である。)
"local(" + <string> + ")"where <string> is the profile's unique ID as specified by International Color Consortium. (Note: Profile description fields do not represent a profile's unique ID. With current ICC proposals, the profile's unique ID is an MD5-encoded value within the profile header.)
値: | <name> |
初期値: | 未定義 |
メディア: | 視覚 |
Values: | <name> |
Initial: | undefined |
Media: | visual |
値: |
auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric |
初期値: | auto |
メディア: | 視覚 |
アニメーション: | 不可 |
Values: | auto | perceptual | relative-colorimetric |
saturation | absolute-colorimetric |
Initial: | auto |
Media: | visual |
Animatable: | no |
'color-profile' 要素の rendering-intent 属性についての記述を見よ。
See the description for the rendering-intent attribute on the 'color-profile' element.
値: | auto | sRGB | <name> | <uri> | inherit |
初期値: | auto |
適用対象: | ラスター画像を参照する 'image' 要素 |
継承: | 有り |
パーセント: | N/A |
メディア: | 視覚 |
アニメーション: | yes |
Value: | auto | sRGB | <name> | <uri> | inherit |
Initial: | auto |
Applies to: | 'image' elements that refer to raster images |
Inherited: | yes |
Percentages: | N/A |
Media: | visual |
Animatable: | yes |
要素 | 属性 | 内容モデル |
---|---|---|
color-profile | Core.attrib, XLink.attrib, local, name, rendering-intent | (Description.class)* |
次に挙げるインターフェースが以下で定義される: SVGColorProfileElement, SVGColorProfileRule
SVGColorProfileElement インターフェースは 'color-profile' 要素に対応する。
interface SVGColorProfileElement : SVGElement, SVGURIReference, SVGRenderingIntent {attribute DOMString _local;attribute DOMString local;// raises DOMException on setting// (NOTE: attribute is prefixed by "_"// as "local" is an IDL keyword. The// prefix will be removed upon processing)attribute DOMString name; // raises DOMException on setting attribute unsigned short renderingIntent; // raises DOMException on setting };
DOMException |
NO_MODIFICATION_ALLOWED_ERR :読み出し専用の属性値の変更を試みたときにレイズされる。
|
DOMException |
NO_MODIFICATION_ALLOWED_ERR :読み出し専用の属性値の変更を試みたときにレイズされる。
|
DOMException |
NO_MODIFICATION_ALLOWED_ERR :読み出し専用の属性値の変更を試みたときにレイズされる。
|
SVGColorProfileRule インターフェースは CSS スタイルシートにおける @color-profile 規則を表現する。@color-profile 規則は文書から参照可能な ICC プロファイルを識別する。
SVGColorProfileRule インターフェースのサポートは CSS によるスタイル付け をサポートするUAにのみ要求される。
interface SVGColorProfileRule : SVGCSSRule, SVGRenderingIntent { attribute DOMString src; // raises DOMException on setting attribute DOMString name; // raises DOMException on setting attribute unsigned short renderingIntent; // raises DOMException on setting };
DOMException |
NO_MODIFICATION_ALLOWED_ERR :読み出し専用の属性値の変更を試みたときにレイズされる。
|
DOMException |
NO_MODIFICATION_ALLOWED_ERR :読み出し専用の属性値の変更を試みたときにレイズされる。
|
DOMException |
NO_MODIFICATION_ALLOWED_ERR :読み出し専用の属性値の変更を試みたときにレイズされる。
|