This template lists as a wikitable row a template name and arguments, a color sample and its hex value.

{{System name colo(u)r|Line}}

Sample: hexval

{{System name col(u)or|Line|Branch}}

Sample: hexval

The template itself is contained between table start and end markup:

{| class="wikitable"
{{Color template doc|system=system|line=line|branch=branch}}
|}

The |branch= argument is optional.

When used on the page Template:National Rail colour/doc, the code {{Rail color doc|system=National Rail colour|line=Eurostar}} produces

{{National Rail colour|Eurostar}} Sample: style="color:inhert; background:#साँचा:National Rail colour; border-top:solid 1px gray; " |   साँचा:national rail colour