W3C home > Mailing lists > Public > www-style@w3.org > October 2011

RE: [css3-background] should specify color space for box-shadow blurring

From: Brian Manthos <brianman@microsoft.com>
Date: Sat, 1 Oct 2011 00:51:32 +0000
To: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D17EF4502@TK5EX14MBXC266.redmond.corp.microsoft.com>
I'm confused by this.  What does color space ahve to do with box-shadow (or text-shadow for that matter)?

My understanding is that the blurring is all about varying the *opacity* of the shadow -- nothing about changing the color of the shadow.

If color space is involved in varying opacity, then the opacity property would have the same concern.

Further, if varying opacity alone impacts color space, then the CSS3 Values WD needs correction because this assertion would be incorrect:


# Note that transitions where either the transparency or the color
# are held constant (for example, transitioning between rgba(255,0,0,100%)
# and rgba(0,0,255,100%) or rgba(255,0,0,100%) and rgba(255,0,0,0%)) have
# identical results whether the color interpolation is done in premultiplied
# or non-premultiplied color-space. Differences only arise when both the color
# and transparency differ between the two endpoints.

It sounds like you're equating blurring to "blend with transparent <something>" when (as I understand it) there's no color blending at all -- there's "opacity decay".


> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
> Behalf Of L. David Baron
> Sent: Wednesday, September 28, 2011 4:06 PM
> To: www-style@w3.org
> Subject: [css3-background] should specify color space for box-shadow
> blurring
> http://dev.w3.org/csswg/css3-background/#the-box-shadow should
> specify what color space the blurring for box-shadow takes place in.
> The value should probably be one of the values of:
> http://www.w3.org/TR/SVG11/painting.html#ColorInterpolationFiltersPrope

> rty
> i.e., sRGB or linearRGB.
> I suspect existing implementations probably use sRGB (which Mozilla
> does), but I could be wrong.  I recently wrote a test here:
> http://test.csswg.org/source/contributors/mozilla/submitted/css3-

> background/box-shadow/box-shadow-blur-definition-001.xht
> which I realize is assuming that the answer is sRGB.  (I'm not sure
> how many implementations do the blur radius calculation correctly
> yet per our discussions last year for that test to be useful,
> though.)
> -David
> --
> 𝄞   L. David Baron                         http://dbaron.org/   𝄂
> 𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Saturday, 1 October 2011 00:52:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:50 UTC