The human day and night cycle is important for our sleep and the eyes. The correct amount of light is very important for good health. During the evening and the night we need dark colors on websites and apps. It is more natural to have the dark background colors at night. This is the live demo page for the open source code that we can use for the Night/Dark Mode = light switch for websites and HTML apps.
Use this code for free and where you want. It is open source, free and can be changed for re-use too. Use it as you like, as long as you keep the code open source, as same as the original. If you improve or publish the code, please include the same open source license and the names of the original author or contributors. Please also include yourself as a contributor, if you improve or publish the code in the future. Have a lot of fun with this CSS + JS code for the dynamic website color switch !
Dark Mode: 🌓 ⇄ 💡 Purple Mode: 💜 ⇄ 💡 Green Mode: 🍏 ⇄ 💡 Cobalt Blue : 🌊 ⇄ 💡
Try clicking the same button link two times and see what happens.
Original Github Repo Source:
github.com/Dorson/CSS-Dark-Mode-and-color-switch/
Be happy. Talk with people.
🐦 Share on Twitter FB Share on FacebookThank you for sharing !