W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2015

Re: [whatwg] A mask="" advisory flag for <link rel=icon>

From: Kornel Lesiński <kornel@geekhood.net>
Date: Wed, 17 Jun 2015 03:38:45 +0100
Message-Id: <96418353-64A9-417E-9A36-55917F392BD3@geekhood.net>
To: WHAT Working Group <whatwg@lists.whatwg.org>
>> 
>> The reason for treating the icon as a mask is that we want to enforce
>> having a monochrome shape, specifically for our pinned tabs feature.
> 
> The svg <mask> element has a switch for choosing between luminance and
> alpha masking; I think using alpha masking instead seems like a pretty
> clear win.  It makes the color irrelevant, making it more likely that
> the plain icon is appropriate to use for a mask as well, and there's
> no difference in behavior if you're using opaque colors.  (No
> difference in functionality overall, either; you just achieve
> partial-transparency with alpha rather than color.)

I think it would be a big improvement if Safari only looked at the alpha channel and ignored luminance for the mask.

And as I've suggested before, instead of reading the theme color from the problematic <meta theme-color>, Safari could read the theme color from the icon by averaging colors of opaque pixels of the icon. 

Instead of 100% black, authors should be advised to make the icon 100% in the theme color they want.

It would be easy to author (it'd display essentially as-is if the author used a solid color) and still meet the requirement of enforcing a monochrome image (authors that mixed colors against the advice would get one color that is a blend).

And all this would be achieved without the need for another metatag, and the mask icon would the same in other browsers.

-- 
Kind regards, Kornel Lesiński
Received on Wednesday, 17 June 2015 02:39:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:33 UTC