Whether they’re short or long, thick or thin, your nails can reveal a lot of secrets about your health. Changes to the texture, thickness, or color can signal that you’re sick before other symptoms appear.

When you have a chronic disease such as diabetes, it’s even more important to pay attention to the health of your nails. Changes in nail color and thickness could warn of a more serious health problem.

If your nails have turned yellow and you haven’t painted them that color or injured them, most often it’s because you’ve picked up an infection. Usually the culprit is a fungus.

In rare cases, the color change can stem from a condition called yellow nail syndrome. People with this disorder also have lymphedema, or swelling in their body. Yellow nail syndrome also causes fluid in the lungs.

Other possible reasons why your nails can turn yellow include:

In some people with diabetes, the nails take on a yellowish hue. Often this coloring has to do with the breakdown of sugar and its effect on the collagen in nails. This kind of yellowing isn’t harmful. It doesn’t need to be treated.

But in certain cases, yellowing can be a sign of a nail infection. People with diabetes are more likely than those without diabetes to get a fungal infection called onychomycosis. This infection usually affects the toenails. The nails will turn yellow and become brittle.

The thickening that comes along with yellow nails can make it harder and more painful for you to walk. Thickened nails are also sharper than usual. They can dig into the skin of your foot.

If you do get a cut on your foot, nerve damage from diabetes may make it hard for you to feel the injury. Bacteria can find their way into the open sore, causing infection. If you don’t feel the injury and don’t treat the infection, it could damage your foot so much that you need to have it amputated.

Your doctor can treat a fungal infection with a cream or nail lacquer that you rub on the affected nails. Because toenails grow very slowly, it can take a full year for the infection to clear up with this method.

Another option is to take an oral antifungal drug. Combining an oral drug with a topical one you rub on your nails may increase the chance of curing the infection. Terbinafine (Lamisil) and itraconazole (Sporanox) are both considered safe for people with diabetes. These drugs can have side effects, but they’re usually mild. Side effects can include headache, rash, or stuffed nose.

After the infection has gone away, your doctor might recommend that you use an antifungal powder on your nails every few days to stop the infection from returning.

New treatments for nail infections are currently being studied. These include lasers and photodynamic therapy. During photodynamic therapy, you’re given a drug that makes your nails more sensitive to the effects of light. Then, your doctor shines a special light on the nails to get rid of the infection.

As a last resort, your podiatrist can remove the affected toenail. This is only done if you have a severe infection or it won’t go away with other treatments.

If you have diabetes, foot care is even more important than usual. Nerve damage can make it hard for you to feel injuries or other problems with your feet or toes. You need to check your feet often for cuts, sores, and toenail problems so you can catch them before they get infected.

If you have trouble seeing your feet because of diabetic eye disease, or if you’re overweight and can’t reach your feet, have a spouse or other family member check them for you. If you notice yellow nails or any other changes while doing a foot check, schedule a visit with your podiatrist.

Adopting healthy habits will aid in the prevention and better management of the effects of diabetes. Be sure to take the following steps: