It varies from hospital to hospital. At my current hospital, each department has their own colors (Navy for RNs, Olive for RTs, royal blue for PT/OT/professional services, teal for assistive personnel, etc.). My last hospital did not; everybody wore pretty much whatever scrubs they wanted.
Color-coding departments has advantages and disadvantages. The upside is during an emergency you can look around and at a glance know who is there and who isn't. Nobody screams "CALL RESPIRATORY!!!" because they can see there are two sets of olive scrubs in the room.
Conversely, there is a very real social order to the hospital and color-coding sets up a class structure. I have a friend who is a paramedic who teaches ACLS in our hospital system. His main job is teaching in the nursing and EMS education department. He also works the occasional shift as an EKG tech just to round out his schedule. He was doing an EKG and his patient coded. He called the code and started CPR. A nurse came in and kicked him out saying: "Teal doesn't go in the room." He's the guy who TEACHES nurses how to respond to codes, but because of the color of his uniform, a nurse kicked him out. So it can be a problem.
Working on my master's in nursing