Re: luminanceToAlpha values in FEColorMatrix

On Saturday, September 3, 2011, 12:56:02 AM, David wrote:

DW> Dean Jackson wrote:

>>   0.3086 red, 0.6094 green, 0.0820 blue

>> Since sRGB is used throughout the SVG specification, and sRGB takes its values from Rec 709, and Rec 709 seems modern (it's designed for HDTV), and the values are really close to what is already specified, I suggest we formally link to Rec 709 and use its values (a very slight change to current implementations).

DW> sRGB is an engineering compromise, based on the behaviour of CRTs. 

As are most RGB colour spaces.

DW> Computing Y as a weighted average of gamma corrected values is very easy
DW> to do in simple analogue TV hardware,

And this mistake is often made. (The resulting not-actually-luminance value is termed luma, in video specifications).

Happily, this mistake is not made in the sRGB spec, which mandates linearisation before computing the luminance.

DW>  but doesn't one really want to 
DW> have a formula that better reflect the subjective brightness to a human
DW> observer. 

Once could have such a colour space, yes. The ECI RGB space is one such attempt.

DW>  (I believe that, to a first approximation, the human eye can
DW> be modelled with a gamma curve of rather less than x^2.2., but these 
DW> days, if you are using 24 bit colour, you could probably afford to store
DW> the whole lookup Y=f(R,G,B) lookup table, and for greater colour depths,
DW> you could interpolate.

That isn't necessary, the equation for L* is fairly simple. However, SVG does not use such a colour space. And L* is not luminance.

DW> (I missed the start of this, but, if one is then going to use it as an
DW> alpha channel, one also needs to remove any remaining gamma correction.)

Yes, agreed.

 Chris Lilley   Technical Director, Interaction Domain                 
 W3C Graphics Activity Lead, Fonts Activity Lead
 Co-Chair, W3C Hypertext CG
 Member, CSS, WebFonts, SVG Working Groups

Received on Monday, 5 September 2011 20:47:05 UTC