Hammer toes are a separate issue. CVS even has pads and different things to try for them.
The dark purple color though is very concerning, as it is a clear sign of a serious circulation problem. And the extreme pain is your warning signal. There could be a medical condition responsible for this, in addition to cold weather, so a trip to your GP/Internist is warranted.
In the meantime, you should monitor the temperature and your reaction to it. Learn your 'toes' cold tolerance, and don't go out when it's below that.