CSS Color Correction Module


This version:
Latest version:
Previous version:
www-style@w3.org with subject line “[css-color-correction] … message topic …
L. David Baron (Mozilla)


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.

Status of This Document

Table of Contents


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.

An authoring tool that generates style sheets (such as an editor or style sheet generator) conforms to this specification if it generates only conforming style sheets.


untagged image
... include images and canvases ... exclude SVG
untagged video

Opting in or out of color management

Name: color-correction
Value: default | sRGB
Initial: default
Applies to: all elements
Inherited: yes
Percentages: N/A
Media: visual
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?

Colors specified in CSS and colors in untagged images are in the sRGB color space, and implementations MUST display them accordingly.
The color space for colors specified in CSS and colors in untagged images is not defined. However, implementations MUST use a single color space for such colors so that they match each other. When doing so would not cause color mismatches with content such as plugins, implementations SHOULD treat 'auto' the same as 'sRGB'.

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.





Property index