Color code: Difference between revisions

Content deleted Content added
m +{{Authority control}} (1 ID from Wikidata); WP:GenFixes & cleanup on
trying to generalize the article past just the listicle it had turned into. probably need to figure out what belongs here and what belongs in color scheme.
Line 5:
[[File:25 pair color code chart.svg|upright|thumb|[[25-pair color code]] chart used in certain kinds of wiring.]]
 
A '''color code''' is a system for encoding and representing non-color information with [[color]]s to facilitate communication. This information tends to be [[Categorical variable|categorical]] (representing unordered/qualitative categories) though may also be sequential (representing an ordered/quantitative variable).
A '''color code''' is a system for displaying information by using different [[color]]s.
 
==History==
The earliest examples of color codes in use are for long-distance communication by use of flags, as in [[Flag semaphore|semaphore]] communication.<ref>''Transactions of the American Society of Civil Engineers: Volume 29'' (1893), p. 507.</ref> The [[United Kingdom]] adopted a color code scheme for such communication wherein [[red]] signified [[Risk|danger]] and [[white]] signified [[safety]], with other colors having similar assignments of meaning.
 
As chemistry and other technologies advanced, it became expedient to use coloration as a signal for telling apart things that would otherwise be confusingly similar, such as [[Electrical wiring|wiring]] in electrical and electronic devices, and pharmaceutical [[Pill (pharmacy)|pills]].
 
==Encoded Variable==
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.
A color code encodes a variable, which may have different representations, where the color code type should match the variable type:
*[[Categorical variable]] - the variable may represent discrete values of unordered qualitative data (e.g. race)
**[[Binary data#Binary variable|Binary variables]] are typically treated as a categorical variable (e.g. [[gendered associations of pink and blue|sex]])
*[[Quantitative variable]] - the variable represents ordered, quantitative data (e.g. age)
**Discrete quantitative data (e.g. the 6 sides of a [[dice|die]]: 1,2,3,4,5,6) are sometimes treated as a categorical variable, despite the ordered nature.
 
==Types==
Color codes do present some potential problems. On forms and signage, the use of color can distract from black and white text.<ref name="Cohen">See, e.g., Michael Richard Cohen, ''Medication Errors'' (2007), p. 119.</ref> They are often difficult for [[color blindness|color blind]] and blind people to interpret, and even for those with normal color vision, use of many colors to code many variables can lead to use of confusingly similar colors.<ref name="Cohen"/>
{{see also|Color scheme#In maps and data visualization}}
The types of color code are:
*'''Categorical''' - the colors are unordered, but are chosen to maximize saliency of the colors, by maximizing [[color difference]] between all color pair permutations.
*'''Continuous''' - the colors are ordered and form a smooth color gradient.
*'''Discrete''' - only a subset of a continuous color code are used (still ordered), where each is distinguishable from the others.
 
==Criticism==
Color codes do present some potential problems. On forms and signage, the use of color can distract from black and white text.<ref name="Cohen">See, e.g., Michael Richard Cohen, ''Medication Errors'' (2007), p. 119.</ref> They are often difficult for [[color blindness|color blind]] and blind people to interpret, and even for those with normal color vision, use of many colors to code many variables can lead to use of confusingly similar colors.<ref name="Cohen"/>
 
Color codes are often designed without consideration for accessibility to [[color blindness|color blind]] and blind people, and may even be inaccessible for those with normal color vision, since use of many colors to code many variables can lead to use of confusingly similar colors.<ref name="Cohen"/>
 
==Examples==
Line 47 ⟶ 63:
**[[Queen bee#Identification|Queen bee birth year code]]
**[[Utility color code|Underground utility ___location]]
**[[Hospital emergency codes]] often incorporate colors (such as the widely used "Code Blue" indicating a [[cardiac arrest]]),
*In military use:
**[[Homeland Security Advisory System]]
**[[Artillery shell]]s and other munitions, which are color-coded according to their pyrotechnic contents
**[[List of Rainbow Codes]]