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.
Cheers!
A question on palettes/colour cycling
Moderator: Stef
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: A question on palettes/colour cycling
Of course it is possible
You have the principle of color cycling here :
https://en.wikipedia.org/wiki/Color_cycling
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.
You have the principle of color cycling here :
https://en.wikipedia.org/wiki/Color_cycling
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.
Re: A question on palettes/colour cycling
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