prefers-color-scheme - CSS: Cascading Style Sheets | MDNThe prefers-color-scheme CSS media feature is used to detect if a user has requested light or dark color themes.
A user indicates their preference through an operating system setting (e.g. light or dark mode) or a user agent setting.
MDN Web Docs