W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

[csswg-drafts] [css-color-4] Transfer function for ProPhoto RGB (#5229)

From: Chris Lilley via GitHub <sysbot+gh@w3.org>
Date: Wed, 17 Jun 2020 11:54:16 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-640381966-1592394855-sysbot+gh@w3.org>
svgeesus has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] Transfer function for ProPhoto RGB ==
In the [predefined colorspaces](https://drafts.csswg.org/css-color-4/#predefined), the transfer function for `prophoto-rgb` is stated to be 1.8.

In [Design and Optimization of the ProPhoto RGB Color Encodings](http://www.realtimerendering.com/blog/2011-color-and-imaging-conference-part-vi-special-session/), by the authors of ProPhoto RGB, the transfer function is described thus:

> a nonlinear encoding (1/1.8 power **with a linear toe segment**) was added to create the ROMM (Reference Output Medium Metric) RGB color space, intended for display-referred data.

On the ICC website, an extract of [ISO 22028-2:2013](http://www.color.org/chardata/rgb/ROMMRGB.pdf) (which defines ROMM, and thus ProPhoto RGB shows an equation

If Rr, Gr, or Br are less than 0.001953
R = Rr*16 
G = Gr*16 
B = Br*16 

If Rr, Gr, or Br are greater than or equal to 0.001953 
R = Rr^1/1.8
G = Gr^1/1.8
B = Br^1/1.8

The [Wikipedia article](https://en.wikipedia.org/wiki/ProPhoto_RGB_color_space) appears to be accurate and describes a similar toe, with a breakpoint at _Et_ 

Et = 16 ** (1.8 /(1 - 1.8) = 2 ** -9 = 1/512 = 0.0019525

which is the same as the ISO standard but with an explanation of the magic number (and one more digit of precision).

I have heard that an ICC profile distributed by Adobe with Photoshop is described as ProPhoto but uses a simple 1.8 gamma with no toe. (I have also heard that they distribute a similar ICC profile described as sRGB with a simple 2.2 gamma). This may be the origin of the 1.8 gamma often described for ProPhoto RGB. Also, on an 8-bit (0 to 255) system, the breakpoint occurs midway between codes 0 and 1 so has no effect. However, due to the very wide gamut, at least 10 and more likely 12 bits of precision are needed to avoid banding, so the toes does affect the rendered result.

I intend therefore to change the transfer curve in the specification, and the sample code, setting the constant for the breakpoint as 1/512.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5229 using your GitHub account
Received on Wednesday, 17 June 2020 11:54:18 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:09 UTC