There are a few steps between discovering an animal’s fossil and sussing out what it actually looked like. Step one, as this Smithsonian guide explains, is to put the bones together, drawing on knowledge of other skeletons of the same species to fill in whatever’s missing. Step two is to determine the shape of the muscles using markings on the bones. Step three is to puzzle together the exterior: Did the fossil contain horns or other armor? Does the shape of a bone indicate that feathers were attached to it?

The step after that is where scientists can get stuck. Bone lasts through hundreds of millions of years, but skin does not. Skin impressions—the patterns left in the dirt around the body—can tell researchers if an animal was scaly or smooth, but these impressions are rare.

Even the most detailed skin impressions don’t tell paleontologists anything about color, meaning the hues of extinct animals are typically left to human imagination. Consider the many shades of the Tyrannosaurus Rex: In Jurassic Park, it’s a nondescript grayish-brown; in The Land Before Time, it’s green; Barney the Purple Dinosaur, also a T-rex, is, well, purple. For all we know, Barney could be closest to the real thing.

In recent years, though, science has come closer and closer to figuring out how to discover the colors of long-dead species. In 2008, a team at Yale University identified melanosomes, the organelles that manufacture the pigment melanin within a cell, in a fossilized feather. Because melanosomes differ by shape according to the type of melanin they produce—eumelanin, for example, can be black or brown depending on concentration, while pheomelanin is red—the researchers hypothesized that the appearance of a melanosome could be used to infer the color of the animal it belonged to.

But even better than inferring is knowing for sure. In a study published today in the Proceedings of the National Academy of Sciences, researchers from Virginia Tech and the University of Bristol analyzed the chemical structure of melasonomes from several different fossilized species, confirming the correlation between shape and shade—and, they believe, putting lingering doubts about the method to rest.

“People had questioned whether you could use the shape of the melanosome to tell anything about the color, because it’s been through a lot. Millions of years in the ground is obviously going to take a toll,” said Caitlin Colleary, a Ph.D. candidate in geological sciences at Virginia Tech University and the study’s lead author. “So by finding traces of the chemical melanin in association with these structures, we’ve basically confirmed that you can use the shapes of the melanosomes themselves to tell what color something was.”

While past research has examined the melasonomes of dinosaurs and other fossilized reptiles, Colleary and her colleagues included two species of extinct bat in their study, making them the first to identify the color of a mammal through its fossil record. And because color can offer clues to an animal’s environment and behavior, the findings also open the door for an understanding of extinct species that goes beyond the aesthetic.

“It’s so funny to think about how we grew up looking at these textbooks and books that had pictures of dinosaurs in them,” Colleary said, “but we didn’t know what color they actually were. So there are so many animals we should be able to draw with confidence.”

“For me personally, color patterns are also really interesting,” she added. “I’d really like to see the extinct relatives of giraffes, because giraffes have such a distinct color pattern. So it would be really cool to see what those guys look like.”