why do my hands turn blue/purple and red when it's cold?

in winter, when it’s cold, i’ll be walking down the street and i’ll look at to top side of my hands (not the palms) and my fingers have gone literally bright red, but the centre part under the fingers (again, the top part not the palm) has turned blue purple. i do wear gloves to prevent this but i was just wondering why it happens. it doesn’t happen all the time whenever it’s cold, just at certain temperatures. i have known other people who have the same thing and it’s not painfull or anything, but nobody knows what it is.