Color Profiles for CSS3

W3C Working Draft 22 June 1999

This version: http://www.w3.org/1999/06/WD-css3-iccprof-19990623
Latest version: http://www.w3.org/TR/css3-iccprof
Editor: Tantek Çelik (tantekc@microsoft.com)
Authors: Brad Pettit (bradp@microsoft.com),
Tantek Çelik (tantekc@microsoft.com),
Chris Lilley (chris@w3.org)

Copyright © 1999 W3C (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.


This document proposes an extension to CSS to permit finer control over the reproducibility and accuracy of colors used in a Web page.

Status of this document

This document forms one part of a modular set of Working Drafts which will, when complete, define the next level of CSS.

The W3C Membership and other interested parties are invited to review this public specification and report implementation experience. Please send comments to the publicly archived list www-style@w3.org (archive). We welcome experimental implementation experience reports, although the CSS Working Group will not allow early implementation to constrain its ability to make changes to this specification prior to final release.

This Working Draft may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

1. Objective

The objective of this proposal is to provide a method for specifying the correction of the color space of visual entities. There are significant differences between user-agents in how they display images. Not only are there variances between monitors, there are also differences between platforms. Microsoft Windows and Apple MacOS, for example, differ in how they treat the gamma (a measure that affects contrast and brightness), with MacOS using gamma correction by default. Windows, on the other hand, uses uncorrected gamma, so images created on a Mac and viewed on a Windows PC tend to be dark, while images created on Windows PC and viewed without correction on a Mac tend to appear washed out.

The International Color Consortium has established a standard, the ICC Profile, 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. ColorSync is a technology invented by Apple Computer that allows the user-agent implementation to apply these color transformations to images and individual colors. Not all images contain color space information. The W3C has declared, however, that all colors specified in CSS and HTML on the web are in the sRGB color space. Using this as a foundation, it is possible to move toward a web world where Black looks Black, White looks White, and Papaya Whip looks like, well, Papaya Whip.

2. New Properties

2.1 New Property: color-profile

Values:auto | sRGB | <uri> | inherit
Applies to:all elements

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

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.
The source profile is assumed to be sRGB. This differs from auto in that it overrides an embedded profile inside an image.
The name or location of a standard ICC profile resource. Just like specifying sRGB, it overrides an embedded profile. Due to the size of profiles, the <uri> may specify a special name representing a standard profile. The name sRGB, being the standard WWW color space, is defined separately because of its significance, although the rules regarding application of any special profile should be identical.

2.2 New Property: rendering-intent

Values:auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric | inherit
Applies to:all elements

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.

This is the default behavior. The user-agent determines the best intent based on the content type. For image content containing an embedded profile, it should be assumed that the intent specified within the profile is the desired intent. Otherwise, the user agent should use the current profile (based on the color-profile style) and force the intent, overriding any intent that may be stored in the profile itself.


/* potential additions to the base style sheet
   to express default behavior of color-profile and color-intent. */
BODY { color-profile: sRGB; rendering-intent: auto }
IMG { color-profile: auto; rendering-intent: auto }

/* use the specified profile, 
   even if the image contains an embedded profile */
IMG { color-profile: "http://www.colors.corp/images/profiles/mah314.icm" }

Note:This proposal is based on a proposal for HTML support of ICC profiles from Apple Computer with input from Microsoft Corporation.