Template:Game color: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added a Unique Color to DMC)
m (added HL:BS and HL:OP4.)
Line 1: Line 1:
<includeonly>{{#switch: {{{1}}}
<includeonly>{{#switch: {{{1}}}
| {{src04}}
| src04
| Source 2004 = <nowiki>#0cbeda</nowiki>
| {{src06}}
| src06
| Source 2006 = <nowiki>#ff8f00</nowiki>
| {{src07}}
| src07
| Source 2007 = <nowiki>#f26025</nowiki>
| {{src09}}
| {{src09}}
| src09
| src09
Line 28: Line 19:
| hl1
| hl1
| Half-Life = <nowiki>#de5009</nowiki>
| Half-Life = <nowiki>#de5009</nowiki>
| {{hlbs}}
| hlbs
| Half-Life: Blue Shift = {{hlbs|col}}
| {{hlop4}}
| hlop4
| Half-Life: Opposing Force = {{hlop4|col}}
| {{hls}}
| {{hls}}
| HLS
| HLS
Line 33: Line 30:
| Half-Life: Source = <nowiki>#DC143C</nowiki>
| Half-Life: Source = <nowiki>#DC143C</nowiki>
| {{hl2}}
| {{hl2}}
| {{Src04}}
| hl2
| hl2
| src04
| Source 2004
| Half-Life 2 = <nowiki>#ffcc14</nowiki>
| Half-Life 2 = <nowiki>#ffcc14</nowiki>
| {{hl2dm}}
| {{hl2dm}}
Line 39: Line 39:
| Half-Life 2: Deathmatch = <nowiki>#ffdd61</nowiki>
| Half-Life 2: Deathmatch = <nowiki>#ffdd61</nowiki>
| {{hl2ep1}}
| {{hl2ep1}}
| {{src06}}
| hl2ep1
| hl2ep1
| ep1
| ep1
| src06
| Source 2006
| Half-Life 2: Episode One = <nowiki>#ff8f00</nowiki>
| Half-Life 2: Episode One = <nowiki>#ff8f00</nowiki>
| {{hl2ep2}}
| {{hl2ep2}}
| {{src07}}
| hl2ep2
| hl2ep2
| ep2
| ep2
| src07
| Source 2007
| Half-Life 2: Episode Two = <nowiki>#F26025</nowiki>
| Half-Life 2: Episode Two = <nowiki>#F26025</nowiki>
| {{hl2episodes}}
| {{hl2episodes}}
Line 66: Line 72:
| l4ds
| l4ds
| Left 4 Dead series
| Left 4 Dead series
| {{l4dbranch}}
| l4dbranch
| Left 4 Dead engine branch
| Left 4 Dead = <nowiki>#317C29</nowiki>
| Left 4 Dead = <nowiki>#317C29</nowiki>
| {{l4d2}}
| {{l4d2}}

Revision as of 10:19, 6 May 2022

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

Usage

Game color is a template for accessing unique, predefined colors for games and engine branches documented on the Valve Developer Community, based on feature addition templates. This template returns a hexadecimal color value directly and is intended to be used inside of wiki formatting.

Tip.pngTip:Every game icon template (such as {{hl2}}, see Category: Game icons) can return its game color using {{hl2|col}} → #E6AC39. This approach is what this template uses. Use that directly wherever possible.

Parameters

  • {{{1}}} – The full name or abbreviation of a game. If Template:name exists, {{game color|name}} returns {{name|col}}, otherwise {{{default|#add8e6}}}. Other legal values are: todo, in, only, also, since, removed, not.
  • {{{default|#add8e6}}} – The fallback return value if {{{1}}} is invalid.

Examples

{{Game color}} #add8e6 Example text
{{Game color|hl2}} #ffcc14 Example text
{{Game color|hl2|default=#00ff88}} #ffcc14 Example text
{{Game color|qwerty|default=#00ff88}} #add8e6 Example text
{{Game color|qwerty}} #add8e6 Example text
{{Game color|todo}} #add8e6 Example text
{{Game color|removed}} #add8e6 Example text

See also