You might not think much about your urine, but it can hold important clues about your health. Urine is produced when your kidneys filter waste and extra water out of your blood. The waste travels to your bladder, which holds the urine until you’re ready to use the bathroom. Then the bladder muscles contract, sending urine out through a tube called the urethra.

This process is important. When you don’t urinate regularly, waste and fluid can buildup to unhealthy levels in your body. Every day your kidneys can produce 1 to 2 quarts of urine.

Urine gets its color, which is typically yellow, from a pigment called urochrome, or urobilin. Lighter colored urine is more diluted, whereas darker urine contains less fluid. Very dark urine could be a sign that you’re dehydrated.

If your urine doesn’t fit within this color scheme, don’t panic. A lot of things can change the color of urine, including the foods and dyes you eat or the medications you take. For example, beets and berries can turn urine red. Depending on which medication you take, your urine can turn a rainbow of colors, from yellow to red to blue.

Certain colors, however, can indicate a problem. A red or pink hue could be a sign of blood in the urine. If you suspect blood in your urine or notice clots, it’s important to see your doctor to determine the cause. Brown urine may indicate something as simple as a new medication, or it could be a sign of a more serious condition. Here are some possible causes of brown urine.

Some foods may turn urine brown if you eat enough of them. These include:

  • aloe
  • fava beans
  • food colorings
  • rhubarb

Conditions and diseases that can turn urine brown include:

Medications that can make your urine darker include:

Additionally, muscle injury caused by intense exercise, injury, or chemical means can lead to rhabdomyolysis. This can cause the release of a substance called myoglobin, which turns the urine brown or pink. If this occurs after exercise, it’s important to seek medical attention right away.

If you notice that your urine is darker, a good first step is to drink more water to rule out dehydration as the culprit. You should also think about the foods you’ve eaten and the medications you’ve taken. If you’ve eaten a food or taken a medication known to tint urine brown, you’ve likely found your cause. If not, be on the lookout for other symptoms. For example, if your urine is dark brown and you also notice a yellowing of your skin and eyes, see your doctor as soon as possible. These could be signs of a liver problem.

When you visit your doctor, they will do urine tests to look for health problems that could be affecting your urine color. These include tests to see whether the kidneys are filtering normally and tests to look for urinary tract infections. Your doctor may also do blood tests. Once you know what’s to blame for the color change, you can stop eating the offending food, switch medications, or treat the condition involved.