Hi Circle. It’s time to support dark mode favicons. It’s not that hard. Here’s some JavaScript to help you out… can put this at the bottom of the head element.
<script>
try {
const faviconEl = document.createElement('link');
faviconEl.setAttribute('rel', 'shortcut icon');
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
faviconEl.setAttribute('href', 'PATH TO A WHITE/LIGHT ICON');
} else {
faviconEl.setAttribute('href', 'PATH TO A BLACK/DARK ICON');
}
document.getElementsByTagName('head')[0].appendChild(faviconEl);
} catch (e) {
console.error('Failed setting favicon.');
}
</script>