The colors or numbers themselves are often a clue, but they alone may not provide sufficient information. There is always the trial and error method, but I do not recommend that because of the potential for destructive results. Instead, the Motor Doctors suggestion is to equip yourself with an ohmeter (don nott settle for just a continuity tester) and learn to perform a few simple tests with it.
You should be able to isolate into two groups any leads which have continuity with one another. The starting circuit is likely to isolate to two leads, the running circuit may have two or more leads that show continuity. If the running circuit has more than two leads, you will need to determine how those leads are to be used for voltage or speed changes.
Shield drain wire must be spliced only to mating shield drain wires and not grounded at the junction box. Feedback shields must be passed through pin for pin. Separate junction boxes for power and feedback are required.
Here is where metallurgy comes into play. A motor rich in magnetically soft material will be more efficient, producing more work with less heat. And since the magnetic capacity of a motor also is influenced by the amount of active material (more core, more laminations), the tendency might be to try to add as much magnetically soft material to your design as possible.