# Why does Arcade have a 16 colour palette?

**URL:** <https://forum.makecode.com/t/why-does-arcade-have-a-16-colour-palette/483>\
**Category:** Arcade\
**Created:** [August 25, 2019, 11:41am UTC](https://forum.makecode.com/t/why-does-arcade-have-a-16-colour-palette/483 "2019-08-25T11:41:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjw](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@kjw](https://forum.makecode.com/u/kjw)\
**Post date:** [August 25, 2019, 11:41am UTC](https://forum.makecode.com/t/why-does-arcade-have-a-16-colour-palette/483/1 "2019-08-25T11:41:21Z")

</div>

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](https://forum.makecode.com/t/dreaded-021-frowny-face/129)) 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:

![MakeCode-Arcade-The-Sixteenth-Colour-dedede](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/1ef5113a531a79ec026e1ee41d05a0770ff08c1c.png)

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](https://arcade.makecode.com/developer/images) and there’s an excellent John Park guide on this over on [Adafruit Learn: Custom Color Palettes for MakeCode Arcade Games](https://learn.adafruit.com/custom-color-palettes-for-makecode-arcade-games).

---

<div class="post-metadata">

**Author:** ![mmoskal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmoskal/32/20_2.png) [@mmoskal](https://forum.makecode.com/u/mmoskal)\
**Post date:** [August 25, 2019, 3:24pm UTC](https://forum.makecode.com/t/why-does-arcade-have-a-16-colour-palette/483/2 "2019-08-25T15:24:15Z")

</div>

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.
