I am using the Python Imaging Library to colorize a black and white image with a lookup table that defines the color relationships. The lookup table is simply a 256-element list of RGB tuples: >>> len(colors) 256 >>> colors[0] (255, 237, 237) >>> colors[127] (50, 196, 33) >>> My first version used the getpixel() and putpixel() methods: for x in range(w): for y in range(h): pix = img.getpixel((x,y)