How can I specify the text color for a pinned site tile?

1k views Asked by At

I have a web app, I'd like to make into a pinnable website. It currently has the following in its <head> element:

<meta name="application-name" content="MyWebApp">
<meta name="msapplication-TileColor" content="#666666">
<meta name="msapplication-TileImage" content="/images/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="/images/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">

And the browserconfig.xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
  <msapplication>
    <tile>
      <square70x70logo src="/images/favicons/mstile-70x70.png"/>
      <square150x150logo src="/images/favicons/mstile-150x150.png"/>
      <square310x310logo src="/images/favicons/mstile-310x310.png"/>
      <wide310x150logo src="/images/favicons/mstile-310x150.png"/>
      <TileColor>#666666</TileColor>
    </tile>
  </msapplication>
</browserconfig>

However the tile currently displays with very dark text, rather than white text.

My problem is similar to How to change windows 8 live tile text color?, except that's for native apps, this is for for web apps.

A similar question on MSDN has no answers.

2

There are 2 answers

0
Hugh Guiney On

Unfortunately there doesn't seem to be a way to do it for Web apps. Although it can be done in *.VisualElementsManifest.xml on the desktop side with the ForegroundText property, If you look at the Pinned site metadata reference, there is no mention of an equivalent property for browserconfig.xml.

This seems like an oversight; maybe if enough of us let support know about the issue, they'll change it.

0
Antón Molleda On

If I remember correctly, the color of the text depends on the color of the background and it can only be white or black. Build My Pinned Site should have the right logic to know what color the text is going to be. I built it a while ago so maybe some of the logic has change but I doubt it.