Code:
if( ppu_off )
{
if( (ppu_addr & 0x3F00) == 0x3F00 )
{
Output_Pixel( palette[ ppu_addr & 0x1F ] );
}
else
{
Output_Pixel( palette[ 0 ] );
}
}
Blargg's palette demo changes the address several times midscanline by reading/writing $2007 (I forget which). The auto increment changes the address and thus makes it point to a different palette entry, changing the color that gets rendered onscreen.
The only game I can think of offhand that cycles through color emphasis modes is Final Fantasy -- which it does during the battle transition for the flashy effect.