Colorizing part of a texture
this is not a total script but it does the job :


in the default scene (or empty one) create this compositor node setup





you need to run this script just to have random numbers available in the driver :




import bpy
import random

def rand():
    return random.uniform(0,1)

bpy.app.driver_namespace['rand'] = rand



now add a driver for the value nodes with the scripted expression rand()
set the number of frames to render to the number of textures
render the animation and you'll have the output directory full with textures