Template:Game color: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added a Unique Color to HL2DM)
m (fixed calling nonexistent "HL2DM" template.)
Line 15: Line 15:
| src13mp
| src13mp
| Source 2013 MP = <nowiki>#d3f442</nowiki>
| Source 2013 MP = <nowiki>#d3f442</nowiki>
| {{hl1}}
| {{hl}}
| hl1
| hl
| Half-Life = <nowiki>#de5009</nowiki>
| Half-Life = <nowiki>#de5009</nowiki>
| {{HLS}}
| {{hls}}
| HLS
| HLS
| hls
| hls
Line 25: Line 25:
| hl2
| hl2
| Half-Life 2 = <nowiki>#ffcc14</nowiki>
| Half-Life 2 = <nowiki>#ffcc14</nowiki>
| {{HL2DM}}
| {{hl2dm}}
| HL2DM
| hl2dm
| Half-Life 2: Deathmatch = <nowiki>#ffdd61</nowiki>
| Half-Life 2: Deathmatch = <nowiki>#ffdd61</nowiki>
| {{ep1}}
| {{hl2ep1}}
| hl2ep1
| ep1
| ep1
| Half-Life 2: Episode One = <nowiki>#ff8f00</nowiki>
| Half-Life 2: Episode One = <nowiki>#ff8f00</nowiki>
| {{ep2}}
| {{hl2ep2}}
| hl2ep2
| ep2
| ep2
| Half-Life 2: Episode Two = <nowiki>#F26025</nowiki>
| Half-Life 2: Episode Two = <nowiki>#F26025</nowiki>
Line 37: Line 39:
| hl2episodes
| hl2episodes
| Half-Life 2 episodes = <nowiki>#f57214</nowiki>
| Half-Life 2 episodes = <nowiki>#f57214</nowiki>
| {{hlalyx}}
| {{hla}}
| hlalyx
| hlalyx
| hla
| HL:A
| HL:A
| Half-Life Alyx
| Half-Life Alyx
Line 67: Line 70:
| 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}}
Line 77: Line 80:
| Black Mesa (Source)
| Black Mesa (Source)
| Black Mesa = <nowiki>#e47125</nowiki>
| Black Mesa = <nowiki>#e47125</nowiki>
| {{GMOD}}
| {{Gmod}}
| GMOD
| gmod
| gmod
| Garry's Mod = <nowiki>#1295f0</nowiki>
| Garry's Mod = <nowiki>#1295f0</nowiki>
Line 84: Line 86:
| insurgency
| insurgency
| Insurgency = <nowiki>#c7d1e0</nowiki>
| Insurgency = <nowiki>#c7d1e0</nowiki>
| {{INFRA}}
| {{infra}}
| INFRA
| infra
| INFRA = <nowiki>#99ccff</nowiki>
| INFRA = <nowiki>#99ccff</nowiki>
| {{con}}
| {{con}}
Line 108: Line 110:
| mapbase
| mapbase
| Mapbase = <nowiki>#a163c9</nowiki>
| Mapbase = <nowiki>#a163c9</nowiki>
| {{ez1}}
| {{ez}}
| ez
| ez1
| ez1
| Entropy : Zero = <nowiki>#00fff7</nowiki>
| Entropy : Zero = <nowiki>#00fff7</nowiki>

Revision as of 10:01, 19 April 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