code: def _palette(self):
          
          # Loop through available palettes
          self.palette_idx += 1
          try:
              self.loop.screen.register_palette(self.palettes[self.palette_names[self.palette_idx]])
          except IndexError:
              self.loop.screen.register_palette(self.palettes[self.palette_names[0]])
              self.palette_idx = 0
          self.loop.screen.clear()
docs: p