Re: [css-color] wider/deeper colors

On Tue, Mar 22, 2016 at 12:45 AM, Florian Rivoal <> wrote:

> > On Mar 22, 2016, at 11:34, Rik Cabanier <> wrote:
> >
> > It could be a new CSS property, for instance: compositing-space:
> "p3"/"sRGB"/"uncalibrated"/url(..)
> Shouldn't that be "compositing space: sRGB | output | CIELab" ?
> * sRGB: legacy "make everything dull" mode
> * CIELab: because if you're compositing things coming form various color
> spaces or wide gamut color spaces, this is how you get the least color
> distortion.

Compositing in CIELab is uncommon. Most rendering engines are not set up to
deal with rendering Lab. Also, rendering needs to happen at high precision
to avoid banding.

Say your sources are in a gamut wider than the output gamut, and you have
> semi-transparent very saturated red on top of very saturated blue. If you
> composite in CIELab, then convert to the output gamut, you'll get a not
> very saturated color that may not need clipping to fit the output gamut.
> If you fit the colors to output gamut first, then do composition, the
> result will be different (and worse).


> * output: because if all the things you are compositing do fit in the
> output device's gamut, doing composition directly in that space will be
> close enough to what you'd get using CIELab, but is computationally more
> efficient.

close enough? to what?

> I'm not too sure why you'd want to do composition in any other space than
> these 3.

You want to composite in the color profile that you're targeting and then
convert that result to your destination.
That way you get consistent color or if your device is too limited, as
close to it as possible.
For example:

<body style="compositing-space: p3">

<div style="background-color: red">

<img src="image_with_adobeRGB_profile.jpg" style="opacity:.5">

This will composite the document to a p3 bitmap. The jpeg is colormapped
from AdobeRGB to p3.
On a new iMac or iOS device this bitmap is displayed as-is. On a lesser (or
better) device, this bitmapped is colormapped and then displayed.

Received on Tuesday, 22 March 2016 23:12:09 UTC