How to Emulate prefers-color-scheme on Google Chrome

This article shows how to emulate prefers-color-scheme on Google Chrome, so that we can test the light and dark color mode of our sites.

  1. Press F12 for openning the developer tools.

  2. And then press CTRL+SHIFT+P for opennging the commands input.

  3. Then type prefers, the emulate options will be showed up.

模拟 prefers-color-scheme