A color Doppler ultrasound of both lower extremities is done to check for deep vein thrombosis (DVT), which is the formation of blood clots in the veins. This test helps in the diagnosis of DVT, which can be life-threatening if not diagnosed and treated on time.