Ambient light sensor

Limited availability

The AmbientLightSensor API returns the current light level in lux of the ambient light level around the device.

Browser support (view on caniuse.com)

  • Chrome Not supported Bugs:
  • Chrome Android Not supported
  • Edge Not supported
  • Firefox Not supported
  • Firefox for Android Not supported
  • Safari Not supported
  • Safari on iOS Not supported

Need this feature?
Leave a 👍 on the feedback issue
Don't forget to also leave a comment explaining your specific use case.

MDN documentation

Developer use cases

  • dark mode and light mode are insufficiently naturing honoring - I want to use ambient light sensor to provide a more nuanced real-time themeing experience dark mode and light mode are insufficiently naturing honoring - I want to use ambient light sensor to provide a more nuanced real-time themeing experience [see original comment]