Your page can sense how light it is. See: https://www.w3.org/TR/ambient-light/.
ACME Labs / Web APIs / Ambient Light Sensor