Its kinda complex, it pretty much generates patches based on how closely the colors around it match >>> Run in turbo <<< (Shift-Click flag) Kinda looks like someone speed drawing
Changed scripts and made it look better >>> http://phosphorus.github.io/app.html?id=92709274&turbo=true&full-screen=true