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 Colors chapter of the CSS2 specification (see [CSS2]).
Additionally, SVG content can specify an alternate color specification using an ICC profiles (see [ICC32]). If ICC-based colors are provided and the SVG user agent support ICC color, then the ICC-based color takes precedence over the sRGB color specification.
For more on specifying color properties, refer to the descriptions of the 'fill' property and the 'stroke' property.
The 'color' property is used to provide a potential indirect value (currentColor) for the 'fill' and 'stroke' properties.
Value: | <color> | inherit |
Initial: | depends on user agent |
Applies to: | 'fill' and 'stroke' properties |
Inherited: | see Inheritance of Painting Properties |
Percentages: | N/A |
Media: | visual |
Animatable: | yes |
For a description of the parameters, refer to [CSS2].
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.
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 color profile database 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 in CSS style sheets are specified via an @color-profile rule. The general form is:
@color-profile: { <color-profile-description> }where the <color-profile-description> has the form:
descriptor: value; [...] descriptor: value;
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.
The following are the descriptors for a <color-profile-description>:
Values: | sRGB | <uri> | inherit |
Initial: | auto |
Media: | visual |
Values: | <name> |
Initial: | undefined |
Media: | visual |
Values: | auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric | inherit |
Initial: | auto |
Media: | visual |
Animatable: | no |
This property permits the specification of a color profile rendering intent other than the default. The behavior of values other than auto and inherent are defined by the International Color Consortium standard.