You are reading a single comment by @HughB and its replies.
Click here to read the full conversation.
-
I guess you refer to the line
g.setTheme({bg:"#f0f",fg:"#fff",dark:true}).clear();
This is actually an variant I tried before - and it is not working!
If background is globally set to green, f.e., it remains green even after that line!
In order to give you some steps to reproduce the problem (in the REPL):
Try
let customTheme = { fg:g.toColor(0,0,0), fg2:g.toColor(0,0,1), fgH:g.toColor(0,0,0), bg:g.toColor(0,1,0), bg2:g.toColor(0,1,0), bgH:g.toColor(1,1,0) }; let globalSettings = Object.assign( require('Storage').readJSON('setting.json', true) || {}, { theme:customTheme } ); require('Storage').writeJSON('setting.json', globalSettings);
first, then try
g.setTheme({ bg:'#000' }); g.clear(false);
(tested on a real device with firmware 2v11)
See the example at the bottom of the waveclk.