hyperambient icon indicating copy to clipboard operation
hyperambient copied to clipboard

Ambient light test data

Open albinekb opened this issue 8 years ago • 1 comments

Regarding #1 it would be nice to have something to test the brightness with. Is there anything out there to intercept the API? Maybe should we build a simple hook to be able to run a script to for example:

  • Fake fade between dark and light "ambient light" (to be able to test dynamic theme coloring)

albinekb avatar Jul 23 '16 11:07 albinekb

Sorry I couldn't answer you earlier.

The ambient() api is rather primitive, and now it doesn't out of the box support intercepting it..

While implementing it, I used a flashlight to get high ambient data readings and/or just covered it with my hand. But a more proper method for trying it out would definitely make it easier.

A lazy idea would just to rewrite ambient() to return looping values of [dark, shadows, outside, shadows].

But I'm sure open for more proper/better solutions. Maybe we should even just make the ambient() to take like {debug: true} to return values that would cover the transition from dark to light and back.

Btw, I got following ambient light readings when I was implementing it:

where lux
Dark 0
Darkish room 116072
Next to window (not in direct sunlight) 2487192
Outside shadows 4886520
Outside still shadows 8014320
Direct sunlight 67092480

jamo avatar Jul 24 '16 09:07 jamo