Template:Game color: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Basically, this breaks old pages, so I'm bringing back all the deleteds since we realistically do not have manpower to update all old pages.)
m (just put all the items on a new line and added such items so that for example the "Game name" template could correctly highlight the desired game. and yes, user from past edit is right)
Line 1: Line 1:
<includeonly>{{#switch: {{{1}}}
<includeonly>{{#switch: {{{1}}}
| {{src06}} | src06
| {{src06}}
| src06
| Source 2006 = <nowiki>#ff8f00</nowiki>
| Source 2006 = <nowiki>#ff8f00</nowiki>
| {{src07}} | src07
| {{src07}}
| src07
| Source 2007 = <nowiki>#F26025</nowiki>
| Source 2007 = <nowiki>#F26025</nowiki>
| {{src09}} | src09
| {{src09}}
| src09
| Source 2009 = <nowiki>#558fa5</nowiki>
| Source 2009 = <nowiki>#558fa5</nowiki>
| {{src13}} | src13
| {{src13}}
| src13
| Source 2013 = <nowiki>#9bf442</nowiki>
| Source 2013 = <nowiki>#9bf442</nowiki>
| {{src13mp}} | src13mp
| {{src13mp}}
| src13mp
| Source 2013 MP = <nowiki>#d3f442</nowiki>
| Source 2013 MP = <nowiki>#d3f442</nowiki>
| {{hl1}} | hl1
| {{hl1}}
| hl1
| Half-Life = <nowiki>#de5009</nowiki>
| Half-Life = <nowiki>#de5009</nowiki>
| {{HLS}} | HLS
| {{HLS}}
| HLS
| hls
| Half-Life: Source = <nowiki>#DC143C</nowiki>
| Half-Life: Source = <nowiki>#DC143C</nowiki>
| {{hl2}} | hl2
| {{hl2}}
| hl2
| Half-Life 2 = <nowiki>#ffcc14</nowiki>
| Half-Life 2 = <nowiki>#ffcc14</nowiki>
| {{ep1}} | ep1
| {{ep1}}
| ep1
| Half-Life 2: Episode One = <nowiki>#ff8f00</nowiki>
| Half-Life 2: Episode One = <nowiki>#ff8f00</nowiki>
| {{ep2}} | ep2
| {{ep2}}
| ep2
| Half-Life 2: Episode Two = <nowiki>#F26025</nowiki>
| Half-Life 2: Episode Two = <nowiki>#F26025</nowiki>
| {{hl2episodes}} | hl2episodes
| {{hl2episodes}}
| hl2episodes
| Half-Life 2 episodes = <nowiki>#f57214</nowiki>
| Half-Life 2 episodes = <nowiki>#f57214</nowiki>
| {{hlalyx}} | hlalyx
| {{hlalyx}}
| hlalyx
| HL:A
| Half-Life Alyx = <nowiki>#c25e36</nowiki>
| Half-Life Alyx = <nowiki>#c25e36</nowiki>
| {{tf2}} | tf2
| {{tf2}}
| tf2
| Team Fortress 2 = <nowiki>#CF7336</nowiki>
| Team Fortress 2 = <nowiki>#CF7336</nowiki>
| {{l4d}} | l4d
| {{l4d}}
| {{l4ds}} | l4ds | Left 4 Dead series
| l4d
| {{l4ds}}
| l4ds
| Left 4 Dead series
| Left 4 Dead = <nowiki>#317C29</nowiki>
| Left 4 Dead = <nowiki>#317C29</nowiki>
| {{l4d2}} | l4d2
| {{l4d2}}
| l4d2
| Left 4 Dead 2 = <nowiki>#BFA828</nowiki>
| Left 4 Dead 2 = <nowiki>#BFA828</nowiki>
| {{as}} | as
| {{as}}
| as
| Alien Swarm = <nowiki>#3E6D7F</nowiki>
| Alien Swarm = <nowiki>#3E6D7F</nowiki>
| {{asrd}} | asrd
| {{asrd}}
| asrd
| Alien Swarm: Reactive Drop = <nowiki>#4e967c</nowiki>
| Alien Swarm: Reactive Drop = <nowiki>#4e967c</nowiki>
| {{portal}} | portal
| {{portal}}
| portal
| Portal 2010 ARG Update
| Portal 2010 ARG Update
| Portal = <nowiki>#6bbcfa</nowiki>
| Portal = <nowiki>#6bbcfa</nowiki>
| {{portal2}} | portal2
| {{portal2}}
| portal2
| Portal 2 = <nowiki>#23B1E5</nowiki>
| Portal 2 = <nowiki>#23B1E5</nowiki>
| {{P2CE}} | P2CE
| {{P2CE}}
| P2CE
| Portal 2: Community Edition = <nowiki>#FF7B02</nowiki>
| Portal 2: Community Edition = <nowiki>#FF7B02</nowiki>
| {{sin}} | sin
| {{sin}}
| sin
| Sin Episodes = <nowiki>rgb(100,165,150)</nowiki>
| Sin Episodes = <nowiki>rgb(100,165,150)</nowiki>
| {{bms}} | bms | Black Mesa (Source)
| {{bms}}
| bms
| Black Mesa (Source)
| Black Mesa = <nowiki>#e47125</nowiki>
| Black Mesa = <nowiki>#e47125</nowiki>
| {{GMOD}} | GMOD
| {{GMOD}}
| GMOD
| Garry's Mod = <nowiki>#1295f0</nowiki>
| Garry's Mod = <nowiki>#1295f0</nowiki>
| {{insurgency}} | insurgency
| {{insurgency}}
| insurgency
| Insurgency = <nowiki>#c7d1e0</nowiki>
| Insurgency = <nowiki>#c7d1e0</nowiki>
| {{INFRA}} | INFRA
| {{INFRA}}
| INFRA
| INFRA = <nowiki>#99ccff</nowiki>
| INFRA = <nowiki>#99ccff</nowiki>
| {{con}} | con
| {{con}}
| con
| Contagion = <nowiki>#417ee0</nowiki>
| Contagion = <nowiki>#417ee0</nowiki>
| {{csgo}} | csgo
| {{csgo}}
| csgo
| Counter-Strike: Global Offensive = <nowiki>#5eedaf</nowiki>
| Counter-Strike: Global Offensive = <nowiki>#5eedaf</nowiki>
| {{mapbase}} | mapbase
| {{mapbase}}
| mapbase
| Mapbase = <nowiki>#a163c9</nowiki>
| Mapbase = <nowiki>#a163c9</nowiki>
| {{ez1}} | ez1
| {{ez1}}
| ez1
| Entropy : Zero = <nowiki>#00fff7</nowiki>
| Entropy : Zero = <nowiki>#00fff7</nowiki>
| {{ez2}} | ez2
| {{ez2}}
| ez2
| Entropy : Zero 2 = <nowiki>#ff5729</nowiki>
| Entropy : Zero 2 = <nowiki>#ff5729</nowiki>
| {{synergy}} | synergy
| {{synergy}}
| synergy
| Synergy = <nowiki>#09e359</nowiki>
| Synergy = <nowiki>#09e359</nowiki>
| {{sfm}} | sfm
| {{sfm}}
| sfm
| Source Filmmaker = <nowiki>#C8B17D</nowiki>
| Source Filmmaker = <nowiki>#C8B17D</nowiki>
| {{dota2}} | dota2
| {{dota2}}
| dota2
| Dota 2 = <nowiki>#AB3928</nowiki>
| Dota 2 = <nowiki>#AB3928</nowiki>
| #default = <nowiki>#add8e6</nowiki>
| #default = <nowiki>#add8e6</nowiki>

Revision as of 09:43, 11 September 2021

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