Template:Rail color box/doc

Usage
This template 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.

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/services have their own colors.

The template can be abbreviated as rcb. All examples use this abbreviated form.

Examples
and  produce

produces

The optional parameter inline (or the third unnamed parameter) allows different display options for inline text.

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:,   and. Note that the  key is not used by this template.

System abbreviations
Lists of available systems are at Category:Rail transport color templates and Special:PrefixIndex/Module:Adjacent stations/.

TemplateData
{	"params": { "1": {			"aliases": [ "system" ],			"label": "System", "type": "string", "required": true, "suggested": true },		"2": {			"aliases": [ "line" ],			"label": "Line", "type": "string", "suggested": true },		"3": {			"aliases": [ "inline" ],			"label": "Inline display type", "type": "string", "suggested": true },		"note": { "type": "string", "label": "Note" },		"type": { "label": "Type (branch/service)", "type": "string" }	},	"description": "Template which generates colored boxes to indicate rail lines, optionally with a link to the line's article.", "paramOrder": [ "1",		"2",		"3",		"type", "note" ],	"format": "inline" }