---
title: "Discussion on \"🌓 How to change the favicon according to system dark mode!\" | Hashnode"
description: "Discussion on \"🌓 How to change the favicon according to system dark mode!\". 👋 Hi again!\nWelcome back to another blog post and this one will also be quite helpful! In this post, I have covered about how you can change the favicon according to system dark mode.\nAn example is  GitHub. When my system color is dark, the logo bec..."
url: "https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [🌓 How to change the favicon according to system dark mode!](https://blog.usmans.me/how-to-change-the-favicon-according-to-system-dark-mode?utm_source=hashnode&utm_medium=feed)

👋 Hi again! Welcome back to another blog post and this one will also be quite helpful! In this post, I have covered about how you can change the favicon according to system dark mode. An example is GitHub. When my system color is dark, the logo bec...

Dec 10, 2020 · 6 min read · blog.usmans.me  
Updated Dec 22, 2020  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#html](https://hashnode.com/tag/html)
-   [#ui](https://hashnode.com/tag/ui)
-   [#ux](https://hashnode.com/tag/ux)
-   [#github](https://hashnode.com/tag/github)

## Written by

[Usman Sabuwala](https://hashnode.com/@usmanwrites)

@usmanwrites · India

  
[View profile](https://hashnode.com/@usmanwrites)

Learning web development, running a YouTube channel

I am a full stack developer, YouTuber and blogger!

## Responses 3

Markdown supported · ⌘↵ to post

[Dev By RayRay](https://hashnode.com/@devbyrayray)

[Aug 28, 2021](https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374/comment/612a419efd0bf8636d76bca2)

This is cool 😎

[Paun Kumar](https://hashnode.com/@Paunthik)

[Aug 18, 2021](https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374/comment/611c91318b9c0305464a0127)

Favicon should change in incognito browsing tab or window if possible

[Kristopher Guzman](https://hashnode.com/@kag359six)

[Dec 11, 2020](https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374/comment/5fd338eacd0355570faea707)

Nice! Quick additional tip, you don't have to run `setInterval` every second. You can add an event listener directly:

```
// chrome + firefox
isDark.addEventListener('change', (e) => {})

// safari
isDark.addListener((e) => {})
```

[Usman Sabuwala](https://hashnode.com/@usmanwrites)

[Dec 11, 2020](https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374/comment/5fd338eacd0355570faea707#reply-5fd37ee002d534634d37faab)

Yeah I got to know about it later. Thanks for letting us know.
