Ambient Light Event

Returns the lux value detected by the devices camera.

Uses

  • Changing colour and contrast to suit lighting conditions

Example

addEventListener('devicelight', function(event) {
  console.log(event.value);
});