Green or Dark Yellow Phlegm. A thick and dark yellow phlegm may be a sign of a viral or bacterial infection, sinus infection, or lower respiratory tract infection. Typically, this occurs when the immune system sends white blood cells, known as neutrophils, to the area of infection.