A color code or colour code is a system for displaying information by using different colors.
The earliest examples of color codes in use are for long distance communication by use of flags, as in semaphore communication. The United Kingdom adopted a color code scheme for such communication wherein red signified danger and white signified safety, with other colors having similar assignments of meaning.
The use of color codes has been extended to abstractions, such as the Homeland Security Advisory System color code in the United States. Similarly, hospital emergency codes often incorporate colors (such as the widely used "Code Blue" indicating a cardiac arrest), although they may also include numbers, and may not conform to a uniform standard.
Color codes are often difficult for color blind and blind people to interpret.
More information, and a list of contexts in which colour coding is used, on the Wikipedia page 
See also Rainbow Codes