When working on my Blazor portal project, I realized that I needed a way to easily switch between light and dark themes, and to make sure that the user's selection persisted even after a page refresh. To accomplish this, I decided to create a service class that could handle theme switching and storage.