Scientists have used sophisticated scanning technology to discover what colors an ancient snake, captured in a colorless fossil, would have had on its skin.

The 10-million-year-old snake, preserved as a fossil— but lacking a head—would have been green, with black or brown blotches, and a pale underside. That’s similar to some snakes living today in the same family, the study, published on March 31 in the journal Current Biology, reports.

"When you get fossil tissues preserved with this kind of detail, you're just gobsmacked when you're looking at it under the microscope," Maria McNamara, a paleobiologist at University College Cork and the study’s lead author, said in a statement. "I was astounded. You almost can't believe what you're seeing."

Related: Giant 'Siberian unicorn' existed much more recently than previously thought, experts say

The snake’s coloring would have helped camouflage it, and it was likely active during the day, the study concludes.

The scientists used a powerful scanning electron microscope to analyze the snake’s chromatophores, which are cells that provide coloring. They then used what they knew about living snakes to figure out what colors this one would have had on its scaly skin.

"For the first time, we're seeing that mineralized tissues can preserve evidence of color," McNamara said.

Related: 'Hobbit' found in Indonesia may have gone extinct earlier than thought

The fossil was first found in the early 20th century in Spain, and is part of the collection at the Dinopolis museum in Teruel, Spain.

The study calls for a search for other specimens that are preserved in the same material, calcium phosphate, which could then be analyzed in a similar way to figure out just what colors some ancient creatures actually were.