What makes Safari render an active extension's icon in color in the toolbar?

Sometimes Safari is rendering the icon for an active extension in its original provided colored representation, other times Safari is applying an overlay color in line with the system's highlight color.

This difference can even be seen seen on the Safari Extensions Developer home page: https://developer.apple.com/safari/extensions/images/extensions-hero-large_2x.png

You will notice that Grammarly's icon is shown in it's original color format, while the others aren't.

Example of extensions where the icon is shown in color:

  • Bitwarden
  • Grammarly
  • 1Password
  • Consent-O-Matic

I've compared the source code of Bitwarden and Consent-o-Matic with my own extension and cannot find any differences in the settings or image properties (resolution, DPI, file type, color profile). If I take the exact PNG source files from said open source extensions and replace them in my own source code, these icons show up in full color.

Does this perhaps mean there is a bug in Safari's processing of the icons where it fails to overlay the icon with the highlight color in some cases?

I and I assume many developers with me would like to understand what determines this difference. Ideally, there is a consistent UX where the end user has the choice between icons in color or highlight color overlay.

The extension's icon will be in color/highlighted if the extension is active on the page that the user is on.

Safari will highlight the icon with the user's system highlight color if the extension's icon is grayscale.

If the icon isn't grayscale, then Safari will show the icon in color if the extension is active on the page.

That's not entirely true ;) Check our GitHub issue https://github.com/twofas/2fas-browser-extension/pull/10 Our extension before version 1.4.4 had a colored icon, but in Safari it was displayed with a blue tint.

What makes Safari render an active extension's icon in color in the toolbar?
 
 
Q