Why does Arcade have a 16 colour palette?

I’m interested in the reasons for having a 16 color palette for MakeCode Arcade. The typical display hardware looks capable in simple terms of 18bit colour.

I can see there are some memory constraints from these small SoC processors (e.g. Dreaded 021 Frowny-Face) and using a small palette balances the number of images and sprites with that small RAM. I’m less familiar with the data pathway to the display but I’m assuming it’s some sort of medium speed, parallel bus which could also be a bottleneck for updates. Small pallete use could be a compromise to achieve a decent frame rate. Are those the only two factors or is there more to this design decision? What was the dominant factor?

BTW, the set background color block is unusual in offering a sixteenth colour. My understanding is the first colour is the special transparent one. Here it’s shown as a light grey (#dedede) in the selection pop-up, see screenshot below:


Trying to use that light grey gives a black background which I presume means that it is acting as a transparent layer to the ultimate, underlying, black background.

For others reference, there’s some useful documentation on the palette including on how to change it on Art and Images and there’s an excellent John Park guide on this over on Adafruit Learn: Custom Color Palettes for MakeCode Arcade Games.

It’s mostly about memory usage. It would be likely faster to use 256 color palette (drawing pixels is simpler then), but we already operate on the edge of 021 on the 96k STM32 MCUs.

We also thought that 15 colors is about the right amount when drawing sprites by hand, not to be overwhelming.

Note that you can dynamically modify the palette.

Color 0 is indeed transparent. If you manage to draw it (eg there are two image drawing functions one that respects transparency and one that doesn’t), it’s black by default.

1 Like