These infections can be difficult to treat, and taking an oral antifungal medication is usually required. Dark spots or streaks rather than full discoloration of the nails may be caused by bruising, psoriasis, melanoma (a type of skin cancer), chronic infections, and medications such as from cancer chemotherapy.