வார்ப்புரு:Rail color box/doc
{{Documentation subpage}}
 {{High-use}}
 {{Sidebar Adjacent stations}}
 {{Template shortcut|rcb}}
 {{Lua|Module:Adjacent stations}}
 
 '''Template:Rail color box''' is intended to be used within station and line infoboxes, diagrams, navboxes and tables to show a small color box and a link to the associated line or service name. Its use should be avoided within body text.
 
 == Usage ==
 * {{tlx|Rail color box|system{{=}}|line{{=}}|inline{{=}}|type{{=}}|note{{=}}}}
 
 == Parameters ==
 {| class=&quot;wikitable&quot;
 |+ Template parameters
 |-
 ! scope=&quot;col&quot; | Parameter
 ! scope=&quot;col&quot; | Description
 |-
 ! scope=&quot;row&quot; | &lt;code&gt;system&lt;/code&gt; or &lt;code&gt;1&lt;/code&gt;
 | An identifier to specify which system's color and line article name convention should be used. Either &lt;code&gt;Module:Adjacent stations/&lt;var&gt;system&lt;/var&gt;&lt;/code&gt; or &lt;code&gt;Template:&lt;var&gt;system&lt;/var&gt; color&lt;/code&gt; ''must'' exist, e.g. [[Template:RE-BB color]] or [[Module:Adjacent stations/Taipei Metro]]
 |-
 ! scope=&quot;row&quot; | &lt;code&gt;line&lt;/code&gt; or &lt;code&gt;2&lt;/code&gt;
 | The line or service to be linked.
 |-
 ! scope=&quot;row&quot; | &lt;code&gt;inline&lt;/code&gt; or &lt;code&gt;3&lt;/code&gt;
 | An optional parameter to create a color box and link suitable for use inline with other text. Valid arguments are listed in the table below.
 |-
 ! scope=&quot;row&quot; | &lt;code&gt;type&lt;/code&gt;
 | This adds &quot; – &lt;var&gt;type&lt;/var&gt;&quot; to the end, where &lt;var&gt;type&lt;/var&gt; is the parameter value (which may be changed by a module subpage), and also passes the value to the data template or module. Typically a service or branch of the line.
 |-
 ! scope=&quot;row&quot; | &lt;code&gt;note&lt;/code&gt;
 | An optional note with more information added at the end.
 |}
 
 {| class=&quot;wikitable&quot;
 |+ {{para|inline}} accepted values
 |-
 ! scope=&quot;col&quot; | Parameter
 ! scope=&quot;col&quot; | Description
 ! scope=&quot;col&quot; | Example
 ! scope=&quot;col&quot; | Example
 |-
 ! scope=&quot;row&quot; | {{Kbd|yes}}
 | Inline color box with link.
 | {{Rail color box|RTD|C|yes}}
 | {{Rail color box|Washington Metro|Green|yes}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|small}}
 | Line strip with link.
 | {{Rail color box|RTD|C|small}}
 | {{Rail color box|Washington Metro|Green|small}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|dot}}
 | Small circle with link.
 | {{Rail color box|RTD|C|dot}}
 | {{Rail color box|Washington Metro|Green|dot}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|square}}
 | Small square with link.
 | {{Rail color box|RTD|C|square}}
 | {{Rail color box|Washington Metro|Green|square}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|link}}
 | Linked box.
 | {{Rail color box|RTD|C|link}}
 | {{Rail color box|Washington Metro|Green|link}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|ldot}}
 | Linked small circle.
 | {{Rail color box|RTD|C|ldot}}
 | {{Rail color box|Washington Metro|Green|ldot}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|lsquare}}
 | Linked small square.
 | {{Rail color box|RTD|C|lsquare}}
 | {{Rail color box|Washington Metro|Green|lsquare}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|box}}
 | Box with link omitted.
 | {{Rail color box|RTD|C|box}}
 | {{Rail color box|Washington Metro|Green|box}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|route}}
 | Box with text.
 | {{Rail color box|RTD|C|route}}
 | {{Rail color box|Washington Metro|Green|route}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|croute}}
 | Box with text and border radius.
 | {{Rail color box|RTD|C|croute}}
 | {{Rail color box|Washington Metro|Green|croute}}
 |-
 ! scope=&quot;row&quot; | {{Kbd|xroute}}
 | Transparent box with text and border radius.
 | {{Rail color box|RTD|C|xroute}}
 | {{Rail color box|Washington Metro|Green|xroute}}
 |}
 
 For systems where multiple colors are used to designate different lines, the appropriate color will be selected based on the combination of the system and line parameters. The same is done for systems where types or services have their own colors. Some options, such as setting the text color, border color, and the short name for the latter three, require the use of a module subpage. Each line can have its own values, as can each type. The table keys for line and type tables are the same: &lt;code&gt;[&quot;border color&quot;]&lt;/code&gt;, &lt;code&gt;[&quot;text color&quot;]&lt;/code&gt; and &lt;code&gt;[&quot;short name&quot;]&lt;/code&gt;. Note that the &lt;code&gt;[&quot;background color&quot;]&lt;/code&gt; key is not used by this template.
 
 ===TemplateData===
 {{Collapse top|title=[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}}
 {{TemplateData header|noheader=1}}
 &lt;templatedata&gt;
 {
 	&quot;params&quot;: {
 		&quot;1&quot;: {
 			&quot;aliases&quot;: [
 				&quot;system&quot;
 			],
 			&quot;label&quot;: &quot;System&quot;,
 			&quot;type&quot;: &quot;string&quot;,
 			&quot;required&quot;: true,
 			&quot;suggested&quot;: true
 		},
 		&quot;2&quot;: {
 			&quot;aliases&quot;: [
 				&quot;line&quot;
 			],
 			&quot;label&quot;: &quot;Line&quot;,
 			&quot;type&quot;: &quot;string&quot;,
 			&quot;suggested&quot;: true
 		},
 		&quot;3&quot;: {
 			&quot;aliases&quot;: [
 				&quot;inline&quot;
 			],
 			&quot;label&quot;: &quot;Inline display type&quot;,
 			&quot;type&quot;: &quot;string&quot;,
 			&quot;suggested&quot;: true
 		},
 		&quot;note&quot;: {
 			&quot;type&quot;: &quot;string&quot;,
 			&quot;label&quot;: &quot;Note&quot;
 		},
 		&quot;type&quot;: {
 			&quot;label&quot;: &quot;Type (branch/service)&quot;,
 			&quot;type&quot;: &quot;string&quot;
 		}
 	},
 	&quot;description&quot;: &quot;Template which generates colored boxes to indicate rail lines, optionally with a link to the line's article.&quot;,
 	&quot;paramOrder&quot;: [
 		&quot;1&quot;,
 		&quot;2&quot;,
 		&quot;3&quot;,
 		&quot;type&quot;,
 		&quot;note&quot;
 	],
 	&quot;format&quot;: &quot;inline&quot;
 }
 &lt;/templatedata&gt;
 {{Collapse bottom}}
 
 == Examples ==
 * {{tlx|Rail color box|system{{=}}Amtrak|line{{=}}Southwest Chief}} and {{tlx|Rail color box|Amtrak|Southwest Chief}} produce {{Rail color box|Amtrak|Southwest Chief}}.
 * {{tlx|Rail color box|SEPTA|Wilmington/Newark|note{{=}}(rush hour service only)}} produces {{Rail color box|SEPTA|Wilmington/Newark|note=(rush hour service only)}}.
 
 == System abbreviations ==
 Lists of available systems are at [[:Category:Rail transport color templates]] and [[Special:PrefixIndex/Module:Adjacent stations/]].
 
 {| class=&quot;wikitable sortable mw-collapsible&quot;
 ! scope=&quot;col&quot; | Abbreviation
 ! scope=&quot;col&quot; | System
 |-
 ! scope=&quot;row&quot; | AMT
 | [[Agence métropolitaine de transport]]
 |-
 ! scope=&quot;row&quot; | BART
 | [[Bay Area Rapid Transit]]
 |-
 ! scope=&quot;row&quot; | CTA
 | [[Chicago Transit Authority]]
 |-
 ! scope=&quot;row&quot; | DART
 | [[Dallas Area Rapid Transit]]
 |-
 ! scope=&quot;row&quot; | HBLR
 | [[Hudson–Bergen Light Rail]]
 |-
 ! scope=&quot;row&quot; | KAT
 | [[Kenosha Transit]]
 |-
 ! scope=&quot;row&quot; | LACMTA
 | [[Los Angeles County Metro Rail]]
 |-
 ! scope=&quot;row&quot; | LIRR
 | [[Long Island Rail Road]]
 |-
 ! scope=&quot;row&quot; | MARC
 | [[MARC Train]]
 |-
 ! scope=&quot;row&quot; | MARTA
 | [[Metropolitan Atlanta Rapid Transit Authority]]
 |-
 ! scope=&quot;row&quot; | MBTA
 | [[MBTA Commuter Rail]]
 |-
 ! scope=&quot;row&quot; | METROMN
 | [[Metro (Minnesota)]]
 |-
 ! scope=&quot;row&quot; | MNRR
 | [[Metro-North Railroad]]
 |-
 ! scope=&quot;row&quot; | MUNI
 | [[Muni Metro]]
 |-
 ! scope=&quot;row&quot; | NJT
 | [[NJ Transit]]
 |-
 ! scope=&quot;row&quot; | NMRX
 | [[New Mexico Rail Runner Express]]
 |-
 ! scope=&quot;row&quot; | NYCRR
 | [[New York Central Railroad]]
 |-
 ! scope=&quot;row&quot; | PATCO
 | [[Port Authority Transit Corporation]]
 |-
 ! scope=&quot;row&quot; | PATH
 | [[Port Authority Trans-Hudson]]
 |-
 ! scope=&quot;row&quot; | PLR
 | [[Pittsburgh Light Rail]]
 |-
 ! scope=&quot;row&quot; | RIRTR
 | [[Rochester Subway]]
 |-
 ! scope=&quot;row&quot; | RTD
 | [[Denver]] [[Regional Transportation District]]
 |-
 ! scope=&quot;row&quot; | SCAX
 | [[Metrolink (California)]]
 |-
 ! scope=&quot;row&quot; | SCVTA
 | [[Santa Clara Valley Transportation Authority light rail]]
 |-
 ! scope=&quot;row&quot; | SEPTA
 | [[SEPTA|Southeastern Pennsylvania Transportation Authority]]
 |-
 ! scope=&quot;row&quot; | SFRTA
 | [[Tri-Rail]]
 |-
 ! scope=&quot;row&quot; | STLLR
 | [[Link light rail|Sound Transit Link light rail]]
 |-
 ! scope=&quot;row&quot; | SNDX
 | [[Sounder commuter rail]]
 |-
 ! scope=&quot;row&quot; | STML
 | [[St Louis MetroLink]]
 |-
 ! scope=&quot;row&quot; | TMTC
 | [[MAX Light Rail]]
 |-
 ! scope=&quot;row&quot; | VMR
 | [[Valley Metro Rail]]
 |-
 ! scope=&quot;row&quot; | VREX
 | [[Virginia Railway Express]]
 |-
 ! scope=&quot;row&quot; | WMATA
 | [[Washington Metropolitan Area Transit Authority]]
 |}
 
 == Variants ==
 {{Color box templates}}
 
 &lt;includeonly&gt;{{Sandbox other||
 [[Category:Rail transport templates]]