automated optical inspection?
using a thumbnail of a snapshot from a mobile phone pointed at the thing arbitrarily, instead of industrial standard practices?
this is a “hard” problem because your scene has variability you didn’t nail down.
even if you locate the PCB, which is doable with feature matching and homography, you still have the wires going any which way.
you will need a picture with a lot better illumination. more resolution would also help.
I can imagine that if you had registered the PCB to its model, you could look for non-pcb colored pixels near each pad, and take that to be the wire insulation’s color.