Looking for a Paintbucket / Fill shader

Hallo Coders, I got a little request for a shader, but no idea where to to start. I want to be able to fill a colouring page, for black/white drawings.
A bit like the Paint Bucket Tool in Photoshop. I tried to use UNC’s awesome Growth (EX9.Texture Filter), the result is fun, but not exactly what I was looking for. Hope some one is nice enough to pick up the challenge.

Needs XY (mouse) and color input I think.