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.
For wiring a single-phase motor, the most important objective is to distinguish the starting circuit from the main winding. These two circuits are isolated from one another electrically if the lead wires are separarted and not in contact with each other. Initially, the ohmeter can be used to determine which wire belongs to which circuit as well as checking continuity between leads.
Avoid splicing motor power cables when ever possible. Ideally, motor power cables should run continuous between the drive and motor terminals. The most common reason for splicing is to incorporate high-flex cable for continuous flexing applications.
Do not coil excess cable of different types (i.e. motor power and feedback) together. An efficient transformer is formed at HF. Cable lengths should ideally be trimmed to fit the application. If excess cable cannot be trimmed, it should be laid in an ‘S’ or figure eight pattern.