From 1861 to 1865, the Civil War tore the United States asunder. But while the country may have been consumed by conflict, new research suggests soldiers off the battlefield still made time for a wee bit of vanity.

Archaeological excavations at Camp Nelson—a former Union outpost in central Kentucky—have unearthed broken bottles that once held hair dye likely used to darken light-toned locks that might otherwise wash out as gray or white in photographs, reports Jeff McDanald for the Lexington Herald-Leader.

The bottles represent a small selection of the many artifacts found at the site in 2015, when researchers unearthed the remnants of a 150-year-old photography studio—the first ever found at a Civil War encampment.

“I think it’s a really exciting find,” Bob Zeller, director of the Center for Civil War Photography, tells McDanald. “Now, we have an archaeological discovery of a Civil War photo studio. As far as I know, it has not happened before.”

Camp Nelson, first established during the war as a Union supply depot, morphed into one of the war’s largest recruitment and training centers for African-American soldiers—many of whom shed their slavery upon enlistment, as Lyndsey Gilpin reported for the Guardian last year. Spurred by brewing tensions and hopes of securing their freedom, slave families traveled in droves to the site, which also served as a refugee camp for women and children.

Sprawling over some 4,000 acres, the site hosted thousands of people from all backgrounds. New residents quickly found community in the tiny town—complete with taverns, a bakery, a prison and a post office—that sprang up on Camp Nelson’s flanks. The local industry grew enough to sustain a portraiture business run by a young photographer named Cassius Jones Young, the researchers found, as evidenced by the bits of picture frames, glass plates and chemical bottles strewn throughout the soil.

The team was surprised to discover shards from bottles that once held rich dyes likely used by portrait sitters to darken their hair, Stephen McBride, Camp Nelson’s director of interpretation, tells McDanald.

“We found a lot of [the bottles],” McBride says. “It’s something you just don’t find on other sites.”

During the Civil War, photography was undergoing something of a boom, as soldiers scrambled to immortalize themselves in images sent to loved ones as fond mementos or commemorations of their service.

“Being a soldier was and is a special status associated with manhood, bravery and honor,” McBride explains to McDanald. “The portraits and the identifying stencils were important to the men to illustrate their status as both men and soldiers at that moment, but also for posterity, as they could soon be wounded or killed.”

The looming threat of death certainly upped the ante on taking the perfect portrait. Soldiers wanted to look their best—even if it meant exaggerating certain aspects of their appearance.

That’s where the dye comes in, though its popularity can’t be blamed entirely on vanity. In the 1860s, the commercialization of color photographs was still decades away, and black and white images tended to exaggerate blonde-ish hair into gray or even white. To avoid accidentally aging themselves, soldiers in front of the camera may have used dyes to wage war—not against the Confederates, but against the ghastly pallor of their own luscious locks.

The catch? There were no Instagram filters to save soldiers when the pigments ran out. Photos of Confederate General Pierre Gustave Toutant Beauregard show his hair grayed within a year of the Civil War’s start. While some attribute the change to stress, others have speculated that the military man’s dye supply ran dry when the Union navy began to throttle Confederate ports.