I use this code to create rectangle with solid color on background
def create_image(self): image = pygame.transform.scale(pygame.image.load(