You're right!
Behavior must have changed in the past year, because when we used
'-webkit-mask-image' to convert animations to HTML last year we had to
explicitly remove the color from the mask to avoid luminosty.
Rik
On Wed, Apr 18, 2012 at 3:22 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
> On Thu, Apr 19, 2012 at 7:34 AM, Rik Cabanier <cabanier@gmail.com> wrote:
>
>> -webkit-mask-image is identical to SVG's definition of mask: convert RGB
>> to luminance and multiply with the alpha.
>>
>
> The discussion in http://www.webkit.org/blog/181/css-masks/ suggests it
> only uses alpha. This testcase, run in Chrome, also indicates that only
> alpha is used:
>
> <canvas id="c" width="100" height="100"></canvas>
> <div id="d" style="width:100px; height:100px; background:lime;"></div>
> <script>
> var c = document.getElementById("c");
> c.getContext("2d").fillRect(0, 0, 100, 100);
> document.getElementById("d").style.webkitMaskImage = "url(" +
> c.toDataURL() + ")";
> </script>
>
> Rob
> --
> “You have heard that it was said, ‘Love your neighbor and hate your
> enemy.’ But I tell you, love your enemies and pray for those who persecute
> you, that you may be children of your Father in heaven. ... If you love
> those who love you, what reward will you get? Are not even the tax
> collectors doing that? And if you greet only your own people, what are you
> doing more than others?" [Matthew 5:43-47]
>
>