For some people, freckles are a cosmetic obstacle. For others, they're a hot fashion accessory. But what causes the skin sprinkles that some people call "angel's kisses"? Basically, it's all in your genes—and the sun.

Freckles are concentrated flecks of melanin, a pigment protein. Melanin shows up when ultraviolet radiation (UV) hits the skin. UV is damaging, and melanin protects the skin from that damage by darkening it—think of it like your skin slipping on a pair of shades.

Melanin is produced in a type of cell called melanocytes. In some people, melanocytes are spread out evenly, and sun exposure produces a smooth wash of melanin, also known as a tan. In others, melanocytes are bunched up, and the sun produces crazy constellations of melanin, a.k.a. freckles. 

So why do redheads tend to have more freckles? Because both red hair and freckles are usually caused by the same gene, MC1R. The gene perches on melanocytes and controls the pigment balance in both hair and skin. When MC1R is working the way it normally does, it converts any pigment the body produces into eumelanin, which is responsible for black and brown hair and skin colors. When the MC1R gene is “broken,” it allows a rarer type of human pigment, pheomelanin, to build up in the body. Pheomelanin causes reddish hair and the rusty look of most freckles. Variations of the MC1R may also control the number of freckles people have.

But MC1R isn’t the only gene causing freckles. About a decade ago, scientists discovered another gene responsible for freckles in Chinese populations. Other genes may be involved too—scientists have yet to unravel all of the genetic causes behind freckles, which occur in a variety of ethnic groups. Regardless of the precise genetic mechanism, freckles are always a family affair: Parents pass on the likelihood of freckling, as well as its locations across the body.

While some pigmented skin disorders can also cause freckling, freckles by themselves are not a cause for concern (unlike moles, which are raised bumps on the skin—freckles are flat). But if you have freckles, make sure to wear plenty of sunscreen, since the areas where the freckles aren’t located will be especially susceptible to sunburn. You can think of them as spelling out your own little reminder system.