Write a method like the bucket tool in photoshop or gimp. You give the method a color value, a seed point, and a tolerance and it acts just like the equivalent tool in photoshop.
e.g.
img.floodFill(point=(100,100),color=Colors.BLACK,threshold = 100)
Anonymous
You seem to have CSS turned off. Please don't fill out this field.