Es modo oscuro
const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
Disgusted Dragonfly
const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
Dark mode may work to decrease eye strain and dry eye for some people who spend a lot of time staring at screens.
However, there’s no conclusive date that proves dark mode works for anything besides extending the battery life of your device.