A question on palettes/colour cycling

SGDK only sub forum

Moderator: Stef

Post Reply
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand

A question on palettes/colour cycling

Post by POLYGAMe » Sat Apr 02, 2016 9:09 pm

Hi again!

Say I have an image loaded that only uses 4 colours and I have a palette of 16. Is it possible to cycle through the pallete colours instead of swapping palettes? I think this could be used for some cool effects. If this is possible, how exactly would it be done? I'm thinking it will be a good way to go for alternating lines on a 2.5D road.


Very interested
Posts: 3044
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres

Re: A question on palettes/colour cycling

Post by Stef » Sun Apr 03, 2016 4:33 pm

Of course it is possible :)

You have the principle of color cycling here :

What you can do as well is to actually storing 2x2bpp (4 colors images) or 4x1 bpp (2 colors) images inside a unique 4 bpp (16 colors) image. For that you have to design an image which actually use all 16 colors of the palette and contains internally the different lower colors images.

Very interested
Posts: 155
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: A question on palettes/colour cycling

Post by alko » Fri Apr 15, 2016 12:49 pm


Very interested
Posts: 80
Joined: Wed Sep 05, 2012 3:30 pm

Re: A question on palettes/colour cycling

Post by Manveru » Sun Apr 17, 2016 9:20 am

Palette animations can be very cool. You can do things like these: http://www.effectgames.com/demos/canvascycle/
The man who moves a mountain begins by carrying away small stones. Confucius, 551-479 BC

Post Reply