color-profile property CSS Reference



Definition and Usage

This property permits the specification of a source color profile other than the default.

Name: color-profile
Value: auto | sRGB | <name> | <uri> | inherit
Initial: auto
Applies to: all elements
Inherited: yes
Percentages: N/A
Media: visual
Computed value: specified value

Syntax

color-profile: auto | sRGB | <name> | <uri> | inherit;

Values

auto
This is the default behavior. All colors are presumed to be defined in the sRGB color space unless a more precise embedded profile is specified within content data. For images that do have a profile built into their data, that profile is used. For images that do not have a profile, the sRGB profile is used so that the colors in these images can be kept "in synch" with the colors specified in CSS and HTML.
sRGB
The source profile is assumed to be sRGB. This differs from auto in that it overrides an embedded profile inside an image. For consistency with CSS lexical scanning and parsing rules, the keyword "sRGB" is case-insensitive; however, it is recommended that the mixed capitalization "sRGB" be used for consistency with common industry practice.
<name>
A name corresponding to a defined color profile that is in the user agent's color profile description database. The user agent searches the color profile description database for a color profile description entry whose name descriptor matches <name> and uses the last matching entry that is found. If a match is found, the corresponding profile overrides an embedded profile inside an image. If no match is found, then the embedded profile inside the image is used.
<uri>
The location of a standard ICC profile resource. Just like specifying sRGB, it overrides an embedded profile.

Examples

/* use the specified profile, even if the image contains an embedded profile */
IMG { color-profile: url("http://example.com/profiles/eg.icm") }

Relative articles