The peacock is one of the most colorful of modern creatures. Fossil analysis could reveal the colors of long-extinct animals. (Marvin Joseph/The Washington Post)

Determining the color of a new species of bat isn't usually difficult. But when that bat lived 50 million years ago, things get trickier. But by analyzing preserved melanin, researchers believe they've managed to pin down the coloring of not one but two extinct species.

Melanin is a pigment that gives many living tissues their darker colors. Scientists have debated whether or not melanin can be preserved in a way that makes ancient colors discernible to modern analysis. Some have suggested that the structures thought to be preserved melanosomes -- the compartments that make and store melanin within cells -- are actually fossilized bacteria. But others have highlighted their similarity to melanosomes in modern animals. Earlier this year, one study found that the suspected melanin in fossilized dinosaur feathers was nearly identical to the melanosomes of a living cuttlefish.

[A crummy dinosaur fossil turns out to hold 75 million-year-old blood and proteins]

In a study published Monday in the Proceedings of the National Academy of Sciences, researchers say they've provided even more evidence that these structures do indeed contain melanin.

The scientists examined the molecular structure of the mystery objects, determining that they were most likely not bacterial fossils, and that they compared closely to modern melanosomes. They solidified the comparison by subjecting the new melanosomes to stresses that would mimic some of the process of fossilization and deterioration, allowing them to determine how different kinds of melanin would look after millions of years in the ground.

"It was important to bring microchemistry into the debate, because discussion has been going on for years over whether these structures were just fossilized bacteria or specific bodies where melanin is concentrated," MIT's Roger Summons, who worked on the cuttlefish study but was not involved in the most recent research, said in a statement. "These two things have very different chemical compositions."

[Dinosaurs may have been warm-blooded after all]

By using the battered modern melanosomes as a guide for what to expect from the fossilized versions, the researchers were able to make informed guesses about color.

"Very importantly, we see that the different melanins are found in organelles of different shapes: Reddish melanosomes are shaped like little meatballs, while black melanosomes are shaped like little sausages, and we can see that this trend is also present in the fossils," senior author Jakob Vinther, a molecular paleobiologist at the University of Bristol, said in a statement. "This means that this correlation of melanin color to shape is an ancient invention, which we can use to easily tell color from fossils by simply looking at the melanosomes shape."

The bats described in the study -- which were reddish brown, by the way -- represent the first extinct mammals to have their color determined by this method, though many researchers have already used melanosomes to determine colors in dinosaur feathers.

Read More:

This robot is inspired by the creepiest fossil ever

First ever evidence of a swimming, shark-eating dinosaur

Now there’s a guide to penis worm teeth

Watch awestruck people seeing color for the first time

Not sure how excited to be about water on Mars? Here’s the 411.