Ah, then it was probably a repair job (incomplete?) by a previous owner giving the new wire colors outside the hub.
If I understand correctly, the yellow phase wire does not have any wire that goes outside the hub now?
Only the blue and green do?
Do all five of the smaller hall wires (power red, ground black, and yellow green blue halls) go all the way from inside to outside the motor?
If any of the wires don't go all the way from inside to outside, you'll need to replace the wire that's broken, and possibly other wires.
How long are the phase (and hall) wires on your controller? If they are long enough, you may be able to cut a couple of feet off and use it to replace that inside the motor. (probably they are not nearly that long though). If they're not long enough for this, you may have other sources of wire you can reuse, or you can order wire by the foot from various places (I think http://ebikes.ca carries some).
It can be important that the phase wires be at least as large a gauge outside the motor as they are inside, and preferably all three the same gauge of wire.