Color code: Difference between revisions

Content deleted Content added
Types: add more information on categorical type
m 9 revisions imported: import edits 1–7 and 9–10 from "Color code" in the August 2001 database dump
 
(23 intermediate revisions by 10 users not shown)
Line 3:
{{for-multi|the computer science and graph theory method|Color-coding|other uses}}
{{excessive examples|date=August 2023}}
[[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).
Line 14:
==Encoded Variable==
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. raceblood type)
** [[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==
{{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.
 
===Categorical===
When color is the only varied attribute, the color code is ''unidimensional''. When other attributes are varied (e.g. shape, size), the code is ''multidimensional'', where the dimensions can be ''independent'' (each encoding separate variables) or ''redundant'' (encoding the same variable). Partial redundancy sees one variable as a subset of another.<ref name="CHRIST75"/> For example, [[playing card suit]]s are multidimensional with color (black, red) and shape (club, diamond, heart, spade), which are partially redundant since clubs and spades are always black and diamonds and hearts are always red. Tasks using categorical color codes can be classified as identification tasks, where a single stimulus is shown and must be identified ([[color task|connotatively or denotatively]]), versus search tasks, where a color stimulus must be found within a field of heterogenous stimuli.<ref name="JONES62"/><ref name="CHRIST75"/> Performance in these tasks is measured by speed and/or accuracy.<ref name="CHRIST75">{{cite journal |last1=Christ |first1=Richard E. |title=Review and Analysis of Color Coding Research for Visual Displays |journal=Human Factors: The Journal of the Human Factors and Ergonomics Society |date=December 1975 |volume=17 |issue=6 |pages=542–570 |doi=10.1177/001872087501700602}}</ref>
The ideal color scheme for a categorical color code depends on whether speed or accuracy is more important.<ref name="JONES62">{{cite journal |last1=Jones |first1=Mari Riess |title=Color Coding |journal=Human Factors: The Journal of the Human Factors and Ergonomics Society |date=December 1962 |volume=4 |issue=6 |pages=355–365 |doi=10.1177/001872086200400604}}</ref> Despite humans being able to distinguish 150 distinct colors along the hue dimension during comparative task, evidence supports that color schemes where colors differ only by hue (equal [[luminosity]] and [[colorfulness]]) should have a maximum of 8 categories with optimized stimulus spacing along the hue dimension,<ref name="JONES62"/> though this would not be color blind accessible. Adding redundant coding of luminosity and colorfulness adds information and increases speed and accuracy of color decoding tasks.<ref name="JONES62"/> Color codes are superior to others (encoding to letters, shape, size, etc.) in certain types of tasks. However, in tasks that require rapid and precise identification, numerals or line inclination may be superior to color.<ref name="JONES62"/>
 
The ideal color scheme for a categorical color code depends on whether speed or accuracy is more important.<ref name="JONES62">{{cite journal |last1=Jones |first1=Mari Riess |title=Color Coding |journal=Human Factors: The Journal of the Human Factors and Ergonomics Society |date=December 1962 |volume=4 |issue=6 |pages=355–365 |doi=10.1177/001872086200400604|pmid=13964770 }}</ref> Despite humans being able to distinguish 150 distinct colors along the hue dimension during comparative task, evidence supports that color schemes where colors differ only by hue (equal [[luminosity]] and [[colorfulness]]) should have a maximum of 8[[eight]] categories with optimized stimulus spacing along the hue dimension,<ref name="JONES62"/> though this would not be color blind accessible. The [[IALA]] recommends categorical color codes in seven colors: red, orange, yellow, green, blue, white and black.<ref>{{cite book |last1=IALA |title=The Surface Colours used as Visual Signals on Aids to Navigation |date=December 2009 |publisher=International Association of Marine Aids to Navigation and Lighthouse Authorities |pages=7–9 |edition=2}}</ref> Adding redundant coding of luminosity and colorfulness adds information and increases speed and accuracy of color decoding tasks.<ref name="JONES62"/> Color codes are superior to others (encoding to letters, shape, size, etc.) in certain types of tasks. However,Adding color as a redundant attribute to a numeral or letter encoding in search tasks thatdecreased requiretime rapidby and50–75%,{{r|CHRIST75|at=Fig9}} but in preciseunidimensional identification tasks, numeralsusing alphanumeric or line inclination maycodes becaused superiorless toerrors than color.<ref namecodes.{{r|1="JONES62"/>|2=CHRIST75|p2=19}}
The ability to discriminate color differences decreases rapidly as the [[visual angle]] subtends less than 12' (0.2° or ~2mm at a viewing distance of 50cm),<ref>{{cite journal |last1=Bedford |first1=R. E. |last2=Wyszecki |first2=G. W. |title=Wavelength Discrimination for Point Sources |journal=Journal of the Optical Society of America |date=1 February 1958 |volume=48 |issue=2 |pages=129 |doi=10.1364/JOSA.48.000129}}</ref> so color stimulus of at least 3mm in diameter or thickness is recommended when the color is on paper or on a screen.<ref>{{cite book |last1=Conover |first1=Donald W. |last2=Kraft |first2=Conrad L. |title=The Use of Color in Coding Displays |date=1958 |publisher=Wright Air Development Center, Air Research and Development Command, United States Air Force |language=en}}</ref> Under normal conditions, colored backgrounds do not affect the interpretation of color codes, but chromatic (and/or low) illumination of surface color code can degrade performance.<ref name="JONES62"/>
 
Several studies demonstrate a subjective preference for color codes over achromatic codes (e.g. shapes), even in studies where color coding did not increase performance over achromatic coding.{{r|CHRIST75|p=18}} Subjects reported the tasks as less monotonous and less inducing of eye strain and fatigue.{{r|CHRIST75|p=18}}
 
The ability to discriminate color differences decreases rapidly as the [[visual angle]] subtends less than 12' (0.2° or ~2mm2&nbsp;mm at a viewing distance of 50cm50&nbsp;cm),<ref>{{cite journal |last1=Bedford |first1=R. E. |last2=Wyszecki |first2=G. W. |title=Wavelength Discrimination for Point Sources |journal=Journal of the Optical Society of America |date=1 February 1958 |volume=48 |issue=2 |pages=129129–135 |doi=10.1364/JOSA.48.000129|pmid=13514579 |bibcode=1958JOSA...48..129B }}</ref> so color stimulus of at least 3mm3&nbsp;mm in diameter or thickness is recommended when the color is on paper or on a screen.<ref>{{cite book |last1=Conover |first1=Donald W. |last2=Kraft |first2=Conrad L. |title=The Use of Color in Coding Displays |date=1958 |publisher=Wright Air Development Center, Air Research and Development Command, United States Air Force |language=en}}</ref> Under normal conditions, colored backgrounds do not affect the interpretation of color codes, but chromatic (and/or low) illumination of surface color code can degrade performance.<ref name="JONES62"/>
 
==Criticism==
Color codes 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>
 
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"/><ref name="COLE04">{{cite journal |last1=Cole |first1=Barry L |title=The handicap of abnormal colour vision |journal=Clinical and Experimental Optometry |date=1 July 2004 |volume=87 |issue=4–5 |pages=258–275 |doi=10.1111/j.1444-0938.2004.tb05056.x|pmid=15312030 }}</ref> Only 15–40% of the colorblind can correctly name surface color codes with 8–10 color categories, most of which test as mildly colorblind. This finding uses ideal illumination; when dimmer illumination is used, performance drops sharply.<ref name="COLE04"/>
 
==Examples==
Line 40 ⟶ 44:
 
*In electricity:
** [[25-pair color code]] – telecommunications wiring
** [[ANSI Z535#Sub-Standards|ANSI Z535.1]] Color Safety Code Standards
**[[Audio and video interfaces and connectors#Audio|Audio connectors]]
** [[Audio and video interfaces and connectors#VideoColor codes|VideoAudio and video interfaces and connectors § Color codes]]
** [[Fiber-optic cable#Color coding of optical fibers|Optical fibers § Color codes]]
** [[Electrical wiring]] – AC power phase, neutral, and grounding wires
** [[Electronic color code]] AKA resistor or EIA color code (today - IEC 60062:2016 )
** [[Ethernet physical layer#Twisted-pair cable|Ethernet twisted-pair wiring]] – local area networks
** [[Jump start (vehicle)|Jumper cables]] used to jump-start a vehicle
** [[PC System Design Guide#Color-coding scheme for connectors and ports|PC99 connectors and ports]]
** [[Surround sound#Channel identification|Surround sound ports and cables]]
** [[Three-phase electric power#Color codes|Three-phase electric power § Color codes]] (electrical wiring)
*In video games
** [[Health (gaming)|Health]] and [[Magic (gaming)|magic points]]
** To distinguish friend from foe, for instance in ''[[StarCraft]]'', ''[[Halo: Combat Evolved|Halo]]'', or ''[[League of Legends]]''
** To distinguish rarity or quality of items in adventure and [[role-playing game]]s<ref>{{cite web|title=Color-Coded Loot|publisher=Giant Bomb|url=http://giantbomb.com/color-coded-loot/3015-4702/|access-date=13 June 2016}}</ref>
*In navigation:
** [[Characteristic light]]
** [[Navigation light]]
** [[Sea mark]]
** [[Traffic light]]s
*Other technology:
** At point of sale (especially for [[packaging]] within a huge range of [[Stock keeping unit|products]]: to quickly differentiate variants, brands, categories)
** ANSI Standardized Safety Colors [[ANSI Z535]]
**[[Bottled gas]]es
** [[FireBottled extinguishergas]]ses
** [[KerbsideFire collectionextinguisher]] s
** [[PipeKerbside markingcollection]]
** [[Pipe marking]]
** [[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]]
** [[NATO Military Symbols for Land Based Systems#Affiliation|NATO Military Symbols for Land Based Systems]]
** [[Rainbow Herbicides]]
*In social functions:
** [[Black hat hacking]], [[White hat (computer security)|white hat]], [[grey hat]]
** [[Blue-collar worker]], [[white-collar worker]], [[pink-collar worker]], [[grey-collar]], [[green-collar worker]]
** [[Handkerchief code]]
** [[ISO 22324]], Guidelines for color-coded alerts in public warning
** [[Jeff Cooper#Combat mindset and the Cooper color code|Cooper's Color Code]] of the combat mindset
** [[Rank in Judojudo]]
** [[Ribbon]] colors ''see:'' [[:Category:Ribbon symbolism]]
* In religion:
** [[Liturgical colours|Clerical vestments, frontals and altar hangings in Christian churches]]