As many of the connectors look very similar, particularly to a novice PC user, the colour-coding of connectors and ports makes it far easier for people to connect peripherals to the correct ports on a PC. This colour code was gradually adopted by almost all PC and motherboard manufacturers. Some of the colour codes have also been widely adopted by peripheral manufacturers.

Colour Function Connector on PC
Mouse and keyboard
   Green PS/2 mouse / pointing device 6-pin mini-DIN female
  Purple PS/2 keyboard 6-pin mini-DIN female
General input/output
  Black USB 1 USB Type A female
  White USB 2.0 USB Type A female
  Burgundy Parallel port 25-pin D female
  Teal or turquoise Serial port 9-pin D male
Video
  Blue Analogue monitor 15-pin VGA female
  White Digital monitor DVI female
Audio
  Pink Analogue microphone audio input (mono or stereo). 3.5 mm TRS
  Light blue Analogue line level audio input. 3.5 mm TRS
  Lime green Analogue line level audio output for the main stereo signal (front speakers or headphones). 3.5 mm TRS