Sensor / 04

Light meter.

Hold your phone level, sensor facing the light source (usually next to the front camera). Don't cover the sensor with your hand. Android Chrome reads ambient light in lux; other browsers cannot.

Notes

Source: AmbientLightSensor (Generic Sensor API). Reading is quantised and rate-limited by the browser for privacy. Scene references on the right are typical values — your sensor's calibration may differ by ±30%.

Illuminance
—
waiting for sensor…
Scene reference
cave / night1 lux
candlelight10 lux
living room100 lux
sunset400 lux
office500 lux
overcast day2000 lux
daylight10000 lux
direct sun100000 lux
Frequently asked

Why does this only work on Android Chrome?

The AmbientLightSensor API is part of the W3C Generic Sensor API, which only Chromium browsers implement — and even there, it's behind a feature flag on most desktops. Apple has not shipped the API on iOS Safari (privacy concerns: reading patterns can leak what's on screen or in the room). Firefox removed legacy light support years ago. If you're on iPhone or desktop, this page will show a fallback message — there's no JavaScript workaround.

How do I enable the sensor on Android Chrome?

Open chrome://flags, search for 'generic sensor extra classes', enable it, and restart Chrome. Some Android phones (Pixel 6+, Galaxy S22+) expose the sensor without the flag. If your phone has no ambient light sensor at all (some budget models omit it), the API will return null and we'll show 'no sensor detected'.

What is lux and what are typical values?

Lux measures illuminance — how much visible light falls on a surface, per unit area. 1 lux = a candle 1m away. Reference: pitch dark cave or moonless night = 0-1 lux, full moon = 0.3 lux, candlelit dinner = 10 lux, sunset / sunrise = 400 lux, well-lit office = 500 lux, overcast daylight = 1000-2000 lux, full daylight (not direct sun) = 10000 lux, direct sunlight = 100000 lux. Phone sensors saturate around 10000-30000 lux on most devices.

How accurate are phone light sensors?

Phone light sensors are designed for auto-brightness, not photography. They're spectrally biased (often over-sensitive to blue/UV from screens, under-sensitive to red), have a narrow acceptance angle, and the readings depend on whether your finger or case is covering the sensor. Expect ±20-30% error versus a dedicated lux meter. Useful for relative comparisons (is this room dimmer than that one?) and order-of-magnitude checks; not for photography or horticulture.

Why does the value lag or update slowly?

Browsers throttle the AmbientLightSensor to ~5 Hz and round the value to coarse buckets (often 50-lux steps in the office range) to reduce fingerprinting and privacy attacks. You'll see the reading jump in steps rather than glide smoothly. The underlying sensor is faster but the browser hides that from web pages.

Is there a workaround for iPhone?

Not via the browser. iOS exposes light sensor data to native apps but not to Safari or WKWebView. If you need a phone lux reading on iPhone, use a native app like Lux Light Meter Free, or grab any Android phone for the browser version. The /sensors/motion page also surfaces ambient light where available, with the same constraints.