From red to blue to violet, all the colors of the rainbow appear regularly in urine tests conducted at hospital labs.

The prismatic pee collection seen in this stunning photo took only a week to assemble for medical laboratory scientists at Tacoma General Hospital in Tacoma, Wash. Heather West, the laboratory scientist who snapped the picture at the hospital, said she and her colleagues collected the urine colors to highlight their fascinating behind-the-scenes work.

"My picture was intended to illustrate both the incredible and unexpected things the human body is capable of, the curiosity in science, and also the beauty that can be found in unexpected places," West said. "A mix between art and science."

None of the urine samples were treated with chemicals in the lab to change their hue, West said. "When I posted the picture [on Flickr], people thought that we did something magical to it. They did not believe it was actually urine," she said.

Hospital labs are often tucked away in a windowless basement, but they play a critical role in patient health. West, 26, who works the night shift, said a love of science and a wish to work in the medical field drew her to the career. "We are impacting every patient that comes into the hospital in multiple ways," she said.

While the chromatic colors of pee are amazing, doctors are usually more interested in the contents of urine. Only a few colors, such as red or dark brown, warn that something is wrong with a patient's health.

"I wouldn't generally just monitor the color of someone's urine," said Kirsten Greene, an assistant professor of urology at the University of California, San Francisco. "But if it's red or bloody, that's a really strong cue that there's infection or cancer, and that's the one I would worry about the most."

Here are some of the reasons for the pee shades.

Red

Blood is the most common cause of red urine, and is a definite health warning signal. "As a urologist, I'm always worried when people have red urine," Greene said. Bladder cancer, infections and kidney stones can all cause bleeding that shows up in urine, and all are worth a trip to the doctor.

More benignly, eating a lot of beets can turn your pee pink.

Orange

Dark-colored urine also points to health problems. Liver cancer can cause dark brown urine, containing excess bilirubin, a brownish pigment produced by the liver.

A drug called phenazopyridine (Pyridium) created the bright orange urine seen in West's photograph. It's a painkiller given to people with urinary tract infections, and converts pee into a Gatorade-like color.

Antibiotics often alter urine color to orange, Green said. People who eat enough carrots to turn their skin orange can have orange pee, too, she added.

Yellow

Many people have seen the effects of dehydration on pee — a dark yellow- colored urine. Without enough water, a pigment called urochrome becomes more concentrated in urine.

On the other hand, in hospitals, some patients on intravenous fluids are so hydrated they produce nearly colorless urine, West said. The cloudy, yellow urine in West's picture was caused by an infection. [Related: How Much Urine Can a Healthy Bladder Hold?]

Green

Green urine usually flows from dilution of blue urine, as in West's image. Occasionally, a urinary tract infection may trigger green pee.

Blue

The rarest of all on the pee rainbow, blue urine often comes from chemicals and drugs given to patients. The No. 1 offender is a drug called methylene blue, used to treat carbon monoxide poisoning, and as a dye during surgery. It makes the blue and green urine seen in West's photograph.

Methylene blue was also a malaria treatment during World War II. Other medications that make blue urine include Viagra, indomethacin and propofol — the anesthetic drug infamously linked with Michael Jackson's death.

Genetic conditions that affect the breakdown of dietary nutrients can also cause blue urine. Even blue food dyes sometimes passes into pee.

Indigo and Violet

In this photo, the deep purple urine comes from a patient with kidney failure. "The dark black one is something that you usually see in kidney failure," West said. "Your kidneys should be filtering your blood and getting rid of your waste, and when you damage the kidneys, there's a lot more blood [in the urine]," she said.

Another violet venue: Patients with catheters can develop a rare complication called "purple urine bag syndrome," linked to a urinary tract infection and highly alkaline urine. A genetic condition called porphyria may also trigger deep purple pee.

Email Becky Oskin or follow her @beckyoskin. Follow us @livescience, Facebook & Google+. Original article on Live Science .