I didn't save the snippets that I normally use, but here's one that I recently used to generate data for a 2-bit font: import pygame colors = { (0, 0, 0, 255): 0, (102, 102, 102, 255): 1, (204, 204, 204, 255): 2, (255, 255, 255, 255): 3, } image = pygame.image.load("font.png") images = [] for tile_...