The issue is that when you create a 4 bit graphics, I believe it maps the colors values right through - but when you draw the image, 4 bits is treated as the Mac color palette.
The easiest thing to do is to supply a palette when drawing your 4 bit buffer:
let buf = Graphics.createArrayBuffer(120, 120, 4, {msb:true});
let bufimg = {
with:120, height:120, bpp:4, palette = new Uint16Array([...]), buffer:buf.buffer
}
g.drawImage(
bufimg,
0,
0,
{scale: 2}
);
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 that when you create a 4 bit graphics, I believe it maps the colors values right through - but when you draw the image, 4 bits is treated as the Mac color palette.
The easiest thing to do is to supply a palette when drawing your 4 bit buffer:
and that might sort you out...