Number of palettes in the GBC

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Number of palettes in the GBC
by on (#139863)
Something I noticed in Wacky Races (GBC) when I was bored watching videos:
https://www.youtube.com/watch?v=rNedYpA ... age#t=1390

As you can see there's a fog effect where stuff that's far away gets dimmed. Alright, probably some palette stuff... but wait, that thing is eating a lot of palettes, since each sprite gets its own fog level. Hm. (note: in the HUD area it switches sprite palettes on the fly so ignore those... also the constant palette switching mid-screen makes it nearly impossible to check in a debugger)

So, stupid question: how many palettes does the GBC have for each layer? Because I completely forgot.
Re: Number of palettes in the GBC
by on (#139869)
The GBC gets 8 palettes for sprites, and 8 palettes for backgrounds, and can freely change palette colors at any time during rendering. Also, the background color for background palettes is not shared, so each background tile gets a full 4 colors.