How to use it
- Use a device whose browser exposes the sensor, over https.
- Press Start and cover or uncover the sensor, usually near the front camera.
- Watch the lux value, the minimum and maximum, and the bar (a logarithmic scale up to 100 000 lx).
- Press Stop to release the sensor.
How it works
The page creates an AmbientLightSensor at 5 Hz after you press Start and stops it on Stop, when you leave the page or when the tab is hidden.
Worked example
A reading of 300 lx falls in the 50–500 lx band, which people often associate with normal indoor lighting. A reading of 25 000 lx is in the direct-sun band.
Tips
- Where the sensor sits differs between phones; try covering the top edge.
- The bar uses a log scale, so each fifth of its width is a tenfold change.