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.
Suppose you take a length of ordinary wire, make it into a big loop, and lay it between the poles of a powerful, permanent horseshoe magnet. Now if you connect the two ends of the wire to a battery, the wire will jump up briefly. It is amazing when you see this for the first time. It is just like magic! But there is a perfectly scientific explanation. When an electric current starts to creep along a wire, it creates a magnetic field all around it.
Without getting into a lengthy physics lecture, this process of reversing polarity produces heat (or wasted energy). This is known as hysteresis loss. And that helps explain why increasing the voltage into the motor will not necessarily increase the output. Instead, it can fight the resistance of magnetic materials to reverse polarity--and simply heat iron.
Think of the atoms of magnetic material as an unruly herd of cattle. Running electric current through the material will polarize these atoms, creating the magnetic field. But as I mentioned, this is an unruly herd, so it takes time for the current to bring all those atoms into formation.