Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambient light test data #3

Open
albinekb opened this issue Jul 23, 2016 · 1 comment
Open

Ambient light test data #3

albinekb opened this issue Jul 23, 2016 · 1 comment

Comments

@albinekb
Copy link

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)
@jamo
Copy link
Owner

jamo commented Jul 24, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants