Yes. These are eschars (from dead tissue). They are most often due to diabetic neuropathy, in which there is loss of sensation - particularly in the lower extremities. This loss of sensation leads to...
You didn't say that you injured yourself, so I'm worried that the blue color and pain might caused by a lack of proper oxygen flow. I would suggest seeing a doctor about this one if it happens often,...