Template:Game color/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (clean up, replaced: See Also → See also)
Line 9: Line 9:
{| class=wikitable
{| class=wikitable
|      {{tlc|Game color|csgo}}
|      {{tlc|Game color|csgo}}
| → || {{Game color|csgo}}
| || {{Game color|csgo}}
|-
|-
| <code><nowiki><span style="color:{{Game color|csgo}}">Example text</span></nowiki></code>
| <code><nowiki><span style="color:{{Game color|csgo}}">Example text</span></nowiki></code>
| &rarr; ||    <span style="color:{{Game color|csgo}}">Example text</span>
| ||    <span style="color:{{Game color|csgo}}">Example text</span>
|-
|-
|
|
Line 18: Line 18:
&#124; style="background:&#123;{Game color|as}};"&#124; Example text<br>
&#124; style="background:&#123;{Game color|as}};"&#124; Example text<br>
&#124;}</code>
&#124;}</code>
| &rarr;
|
|
|
   {| class="wikitable"
   {| class="wikitable"
Line 25: Line 25:
|}
|}


== See Also ==
== See also ==
* {{tl2|new icon}}
* {{tl2|new icon}}
* {{tl2|game name}}
* {{tl2|game name}}

Revision as of 02:11, 12 January 2024

Edit-copy.png
This is a documentation subpage for Template:Game color.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Usage

Template for accessing unique, pre-defined colors for games and engine branches documented on the Valve Developer Community, based on feature addition templates. This template forwards a color variable 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 also return its game color using {{hl2|col}} → #E6AC39. That approach is much cleaner because {{game color}} uses a huge switch statement that also uses templates as keys (such as "{{hl2}}"); This means that every page using {{game color}} creates an entry in the "What links here" list for all game icon templates used.

Examples

{{Game color|csgo}} #E9B963
<span style="color:{{Game color|csgo}}">Example text</span> Example text

{| class="wikitable"
| style="background:{{Game color|as}};"| Example text
|}

Example text

See also