Automatically Switch CSS Colors Between Light And Dark Mode Based On User Preference

This is how I'm switching the CSS colors on my site from light to dark depending on user preference.