yes, but…
“You can change your palette mid-game so long as the new palette is four colours. You cannot change your colours mid-scan-line or any other sneaky trickery. If you have more than four colours on the screen at any one time it is not obeying the rules.”