In your html5 exports use this to detect if you are in light or dark mode - the change your app or game colours to suit...
sysDark=-1
.
.
-- device={application:getDeviceInfo()}
-- device[1]=="Web"
-- only do the next line if html5 export
if JS.eval("window.matchMedia('(prefers-color-scheme:dark)').matches")=="true" then sysDark=1 else sysDark=0 end |
You will end up with sysDark being -1 for 'don't know', 0 for 'light' and 1 for 'dark'...
If we can figure it out for Android, iOS, Windows, etc then it could eventually be an application api call instead?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
https://deluxepixel.com