Rather than spend hours of tedious work in a paint package, we can do this programmatically with Pygame. On Ubuntu, Python 2.6 was already installed and I installed Pygame with:
sudo apt-get install python-pygameWe're making a 512×512 texture that's a 16×16 grid of 32×32 pixel squares. Each square has a number between 0 and 255 printed in the middle and a solid grey background with intensity equal to the value printed on it. In Pygame, you render text to a new surface and then blit that surface onto your target. Also note that we need to initialize Pygame before we do any font rendering. Other than that, there's not a lot to comment on here.
import pygame def make_numbered_texture_atlas(): surface = pygame.Surface((512,512)) font = pygame.font.SysFont("arial",14,bold=True) for i in xrange(256): y = 15 - (i // 16) x = i % 16 fg = (255,255,255) if i<=127 else (0,0,0) bg = (i,i,i) textimage = font.render(str(i), True, fg) w,h = textimage.get_size() surface.fill(bg, (32*x, 32*y, 32, 32)) surface.blit(textimage, (32*x+16-w//2, 32*y+16-h//2)) return surface def main(): pygame.init() pygame.image.save( make_numbered_texture_atlas(), "numbered_texture_atlas.png") if __name__ == "__main__": main()