The issue is you need to call g.reset() in your function before you start drawing (or even it's after calling some other code like drawWidgets) as the other code might have changed the way graphics was configured.
Even if you were lucky and the font stayed the same, maybe the battery widget decided to update the battery and leaves the foreground colour as green :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The issue is you need to call
g.reset()
in your function before you start drawing (or even it's after calling some other code likedrawWidgets
) as the other code might have changed the way graphics was configured.Even if you were lucky and the font stayed the same, maybe the battery widget decided to update the battery and leaves the foreground colour as green :)