0

The problem

Let's suppose I've got an outlined favicon.

It looks perfect on the selected tab with white background:
Black on white gives enough contrast to be seen

But if the tab is inactive / user prefers a dark theme icon cannot be visible:
Dark bluish icon is not seen on black

Minimal example

Is it possible to make icon same color with tab text?

What i've tried

Only my idea was to make svg favicon with fill="currentColor" (rather a silly thing, I know):

<!-- ... -->
<path d="M13 7H11V17H13V7Z" fill="currentColor"></path>
<!-- ... -->

But it is not working.

ISD
  • 984
  • 1
  • 6
  • 21
  • This might help you [https://stackoverflow.com/questions/55170708/detect-if-the-browser-is-using-dark-mode-and-use-a-different-favicon](https://stackoverflow.com/questions/55170708/detect-if-the-browser-is-using-dark-mode-and-use-a-different-favicon) – m24197 Feb 09 '21 at 05:43
  • @iamabdm There was the same answer, but it was deleted by author. But, thanks. – ISD Feb 10 '21 at 08:04
  • Honestly, I also tried that but it did not work until I turned on dark mode, on the pc, not on the browser. But I would recommend you to not use the '#000' (hex color code), instead you can use '#24292e', '#4078c0',etc, as GitHub does (although they have a black favicon). – m24197 Feb 10 '21 at 09:25

0 Answers0