Is there a way to merge palettes for indexed pygame.Surfaces?
问题 I have a Surface BaseSurf with an indexed colour palette, and I want to blit another indexed-colour Surface to it (let's call it NewSurf ). BaseSurf's palette is different from NewSurf's, though, and pygame does not automatically add the missing colours to BaseSurf's palette. I therefore need some way to append NewSurf's colours to BaseSurf's palette without mangling either (overwriting palette indices which are actually used by the Surface's pixels). When I run this code: screen = pygame