Template:Game color/doc

From Valve Developer Community
< Template:Game color
Revision as of 10:10, 24 July 2024 by Popcorn (talk | contribs) (Updated doc.)
Jump to navigation Jump to search
Edit-copy.png

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}}Half-Life 2 The deprecated parameter is being used (col). Please remove this parameter from the article's code or replace it with another one.. 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}} {{Game color}} is deprecated. Remove it from the page. <b style="color:{{Game color}} is deprecated. Remove it from the page.">Example text
{{Game color|hl2}} {{Game color}} is deprecated. Remove it from the page. <b style="color:{{Game color}} is deprecated. Remove it from the page.">Example text
{{Game color|hl2|default=#00ff88}} {{Game color}} is deprecated. Remove it from the page. <b style="color:{{Game color}} is deprecated. Remove it from the page.">Example text
{{Game color|qwerty|default=#00ff88}} {{Game color}} is deprecated. Remove it from the page. <b style="color:{{Game color}} is deprecated. Remove it from the page.">Example text
{{Game color|qwerty}} {{Game color}} is deprecated. Remove it from the page. <b style="color:{{Game color}} is deprecated. Remove it from the page.">Example text
{{Game color|todo}} {{Game color}} is deprecated. Remove it from the page. <b style="color:{{Game color}} is deprecated. Remove it from the page.">Example text
{{Game color|removed}} {{Game color}} is deprecated. Remove it from the page. <b style="color:{{Game color}} is deprecated. Remove it from the page.">Example text

See also