How to emulate light or dark theme switch in chrome
Nowadays, every website comes with dark modes available in order to ease the reader's eyes.
Sometimes, we like to switch between these two while developing. Chrome comes with a varity of options in order to achieve the same.
Dev tools.
- Open Developer tools by pressing
F12
. - Open the Command Control:
Ctrl+Shift+P
orCommand+Shift+P
(Mac) - Type Show rendering
- Set the Emulate CSS media feature prefers-color-scheme to either
prefers-color-scheme: light
orprefers-color-scheme: dark
.