You can still bend a broken bone. Badly bruised bones will turn purple too. I've broken my toes about 10 times, and they've turned purple-yellowish some times. Only you know what you did and if it was bad enough to break a bone. But, if you're in constant pain, it turns purple and swells, and really hurts to move it, the chances are you broke a bone or have a small hairline fracture.
If you can't get to a doctor tonight, eat something solid with weight, take at least four or five tums antacids tablets, then take about three Ibuprofen/Advil/Motrin tablets, and if your stomach can handle it, two acetaminophen/Tylenol tablets too. The Ibuprofen/Advil/Motrin will help bring down the inflammation and swelling, and help with the pain. Acetaminophen/Tylenol will help with the pain. Doctors usually prescribe 600-800 mg's depending on the break. If you have a finger splint (metal sides with foam inside), use it to isolate and support your finger. If you don't, carefully tape the hurt finger to one of the fingers beside it. Medical white cotton or fabric tape works best. Essentially, you want to keep the finger from moving or bending. Seeing a doctor is best, but do these things as a minimum.