Hi! It depends a bit what platform you're aiming for...
Color.cvrtHexToDec
One way of doing it that is efficient and portable between different displays is to use the hex string format that newer Espruino firmwares support:
var red = "#ff0000"; // [#rrggbb](https://forum.espruino.com/search/?q=%23rrggbb) ... g.setColor(red);
Yes in this format it works thanks!
@Gordon started
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.
Hi! It depends a bit what platform you're aiming for...
Color.cvrtHexToDec
which I think is a function that he's made (it's not in core Espruino).One way of doing it that is efficient and portable between different displays is to use the hex string format that newer Espruino firmwares support: