Jeremiah Hass

Why I Switched to Dark Mode by Default

For a long time, I kept my website in a traditional light mode. But as I developed more user-focused designs, I realized that starting with dark mode offers better accessibility, energy savings, and modern appeal β€” especially for developers and tech audiences.

🧠 Better for the Eyes

Dark mode significantly reduces eye strain, especially in low-light environments. For many developers who browse or code late into the night, a darker interface is simply more comfortable.

πŸ”‹ Energy Efficiency

On OLED and AMOLED screens, dark mode can save battery life by reducing the number of pixels actively emitting light. It's a subtle touch, but one that makes a real-world difference.

🎨 Modern Look & Feel

Many users now expect dark mode support. Platforms like GitHub, Discord, VS Code, and macOS have helped normalize it as a default. So I decided my site should match that modern design language.

βš™οΈ How I Did It

I created a .dark-mode class that changes background and text color variables. A JavaScript toggle stores the preference in localStorage, allowing users to switch themes easily.

if (localStorage.getItem("theme") === "dark") {
  document.body.classList.add("dark-mode");
}

🧩 Still Support Light Mode

Of course, accessibility includes choices. That's why I kept a light mode fallback and a toggle. It’s not about choosing one side β€” it’s about offering the best experience for everyone.

βœ… Final Thoughts

Switching to dark mode as default wasn't just an aesthetic decision β€” it was a user-first one. I encourage you to explore your own preferences and offer flexible options in your own designs.