Template:Game color: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (added the engine branch templates.)
Line 80: Line 80:
| Left 4 Dead 2 = <nowiki>#BFA828</nowiki>
| Left 4 Dead 2 = <nowiki>#BFA828</nowiki>
| {{as}}
| {{as}}
| {{asbranch}}
| as
| as
| asbranch
| Alien Swarm = <nowiki>#3E6D7F</nowiki>
| Alien Swarm = <nowiki>#3E6D7F</nowiki>
| {{asrd}}
| {{asrd}}
Line 92: Line 94:
| Portal = <nowiki>#6bbcfa</nowiki>
| Portal = <nowiki>#6bbcfa</nowiki>
| {{portal2}}
| {{portal2}}
| {{portal2branch}}
| portal2branch
| portal2
| portal2
| Portal 2 = <nowiki>#23B1E5</nowiki>
| Portal 2 = <nowiki>#23B1E5</nowiki>
Line 131: Line 135:
| Counter-Strike: Source = <nowiki>#90c0ff</nowiki>
| Counter-Strike: Source = <nowiki>#90c0ff</nowiki>
| {{csgo}}
| {{csgo}}
| {{csgobranch}}
| csgo
| csgo
| {{csgobranch}}
| Counter-Strike: Global Offensive = <nowiki>#5eedaf</nowiki>
| Counter-Strike: Global Offensive = <nowiki>#5eedaf</nowiki>
| {{mapbase}}
| {{mapbase}}

Revision as of 07:09, 9 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