CSS (Cascading Style Sheets) is a language for describing the rendering of HTML and XML documents. While existing specifications define the color space of colors specified in style sheets and in other resources, the rules on color space have generally not been followed, leading to avoidable differences in color between devices or implementations. This document defines a new CSS property that will help migration towards the correct handling of colors that is already defined by allowing authors to specify a preference for the correct or the traditional (device-dependent) color handling.
This is a public copy of the editors' draft. It is provided for discussion only and may change at any moment. Its publication here does not imply endorsement of its contents by W3C. Don't cite this document other than as work in progress.
The (archived) public mailing list email@example.com (see instructions) is preferred for discussion of this specification. When sending e-mail, please put the text “css-color-correction” in the subject, preferably like this: “[css-color-correction] …summary of comment…”
This document was produced by the CSS Working Group (part of the Style Activity).
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
This section is non-normative.
CSS Level 1 ([CSS1]), CSS Level 2 ([CSS21]), and the CSS Color Module, Level 3 ([CSS3COLOR]) define colors specified in CSS to be in the sRGB color space ([SRGB]). However, most or all existing Web browser implementations do not correct colors specified in HTML, CSS, or untagged images even when the proper correction is known.
If browsers did so, it would make the colors displayed in Web pages more consistent between different displays and operating systems. However, a more important type of consistency is the consistency of colors in different parts of a page on the same display, such as between colors specified in style sheets and colors in images, or between those colors and colors drawn by plugins. Improving the consistency of colors between different displays, therefore, requires care not to cause the worse problem of inconsistency of colors on the same display.
In the long run, we hope that it might be possible for implementations to switch to treating CSS colors and colors in untagged images as being in sRGB by default. (This may depend on additions for color management being made to the plugin API and popular plugins using those additions.) Therefore, this specification provides a way to clearly opt in to that correct behavior, but provides an default behavior (initial value) that may be equivalent to this opt-in.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 (see [RFC2119]). This specification uses these words to describe either conformance requirements for style sheets or those for implementations.
Definitions of CSS properties given in this specification MUST be used by style sheets in a manner conformant to CSS 2.1 and its template for property definitions and MUST be interpreted by implementations in a manner conformant to the same (see [CSS21], particularly section 1.4.2 and chapters 4, 6, and 3).
An implementation of this specification (such as a Web browser or other CSS-based renderer) conforms to it if it meets all conformance requirements described as requirements on implementations.
A style sheet conforms to this specification if it meets all the requirements on style sheets.
|Value:||default | sRGB|
|Applies to:||all elements|
|Computed value:||as specified|
The color-correction property specifies the color space that colors specified in CSS and colors in images whose color space is undefined according to the rules for the relevant image format (untagged images) are in. It does not apply to videos, since untagged video should be presumed to be in CCIR 601. Really? Shouldn't video be consistent with images? Or do implementations really do this differently?
auto’ the same as ‘
The initial value of this property may change in a future level of this specification.
Bert Bos, Tantek Çelik, Beth Dakin, Simon Fraser, Chris Lilley, David Singer, and Henri Sivonen have given input useful to the making of this specification.
|color-correction||default | sRGB||default||all elements||yes||N/A||visual|