Learn › GBA Beginner

Lesson 3 of 6 · About 5 min

Sixteen colours a palette

One line of colours turns this blue sky into a sunset.

Spring Jump under a sunset sky with purple mountains.

How Spring Jump writes its colours, which palette paints what, and a sunset in one line.

Red, green, blue, 0 to 31

A GBA colour is red, green and blue, each from 0 to 31, the same 32,768 colours as the GBC. Spring Jump writes each palette as a line of colours, "r g b, r g b, ...", up to 16 of them. The first colour of a palette is see-through.

The game has a palette for each layer of each level: PAL_FAR for the sky and far mountains, PAL_MID for the hills, PAL_FG for the level's tiles, plus the sprite palettes in PAL_SPR.

Each colour has a job

In PAL_FAR, colours 1 to 3 are the bands of the sky, from the top down, and colours 4 to 6 are the far mountains, dark, mid and light. Knowing the job of each colour lets you change the mood of a level without touching a single tile.

Warm skies and cool shadows read as evening; dark blue with bright yellow reads as night.

A sunset

In the session you will turn the first level's sky into a sunset, with the far mountains in purple shadow.

Spring Jump in the editor under a sunset sky with purple mountains, and the AI's reply in the chat.
Make a sunset

Try it yourself

In the app this lesson opens a real game for you, with a guide that walks you through these steps:

  1. The first level's sky and far mountains are one line of PAL_FAR.
  2. Make the first level's sky a sunset, with the far mountains in purple shadow.
  3. The first level now plays at sunset. Each level has its own palettes, so each can have its own time of day.
Start makingDownload on the App StoreGet it on Google Play