How we measure light with your phone camera
Phones don't have a lux sensor you can read on iOS, so Fernhill estimates light from the camera. Here is how, and how close it gets.
On this page3 sections

The question we get most is “is this spot bright enough?”. A real light meter answers it in lux, but most people don’t own one, and iOS doesn’t let apps read the ambient light sensor. So Fernhill’s light meter uses the camera.
From exposure to lux
A camera picks an exposure so the picture isn’t too dark or too bright. If you know the exposure time, the aperture and the ISO it picked, you can work backwards to how bright the scene was:
// Exposure value at ISO 100, from what the camera chose.
function exposureValue(aperture: number, seconds: number, iso: number) {
return Math.log2((aperture * aperture) / seconds) - Math.log2(iso / 100);
}
// Lux for a scene of average reflectance, with a per-model calibration factor.
export function estimateLux(aperture: number, seconds: number, iso: number, k: number) {
return k * 2.5 * 2 ** exposureValue(aperture, seconds, iso);
}
The factor k is the hard part. It differs between phone models, and between the wide and ultra-wide lens on the same phone.
Calibrating 140 phones
We bought a calibrated lux meter and a box of used phones, and measured each phone against the meter at 12 light levels, from a dim hallway to direct sun. Phones we can’t buy come from beta testers, who photograph a grey card next to a window at noon while we read a weather station’s light data for their area.
How close it gets
| Light level | Typical spot | Error after calibration |
|---|---|---|
| Under 500 lux | Middle of a room | ±25% |
| 500 to 5,000 lux | Near a north window | ±12% |
| Over 5,000 lux | South window, summer | ±10% |
That is not good enough for a lab, and it doesn’t need to be. Plants care about the difference between 300 and 3,000 lux, and the camera gets that right every time.