g.setColor(1,1,1).fillRect(0,0,40,40) - will fill a 40px square white
g.setColor(0,0,0).fillRect(0,0,40,40) - will fill a 40px square black
g.setColor(.2,.2,.2).fillRect(0,0,40,40) - will fill a 40px square dithered grey
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.
g.setColor(1,1,1).fillRect(0,0,40,40) - will fill a 40px square white
g.setColor(0,0,0).fillRect(0,0,40,40) - will fill a 40px square black
g.setColor(.2,.2,.2).fillRect(0,0,40,40) - will fill a 40px square dithered grey
So maybe play around with that? :)