Why does your finger sometimes turn purple after a injury?

Venous pooling. Since the space in fingers only holds limited swelling the lymphedema due to injury creates backup of venous flow which cannot go back to body and creates bluish look - it means there is no oxygen available to tissue and tissue is at the brink of dying due to loss of blood supply needs to be taken care of immediately to prevent permanent injury and death of cells.
Swelling. Traumatic injury to a finger can cause swelling, usually around joints. This decreases venous outflow which then causes congestion. This shows up as the purple color.