DEV Community

Discussion on: Enabling Dark Mode On Websites Based On Surrounding Light

Collapse
 
sauloco profile image
Saulo Vargas

Usually cellphones or some notebooks have hardware to detect light and auto-adjust brightness, so it can be used for this.

Collapse
 
ananyaneogi profile image
Ananya Neogi

Yes, this is based on the sensors that are present on your device. The Sensors API exposes those device sensors on to the web platform.