Template:Game color/doc: Difference between revisions
Jump to navigation
Jump to search
Tip:Every game icon template (such as {{hl2}}, see Category: Game icons) can also return its game color using
(Removed game list section because of node cound limit exceeded) |
mNo edit summary |
||
Line 4: | Line 4: | ||
==Usage== | ==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. | 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|Every game icon template (such as {{tl2|hl2}}, see [[:Category: Game icons]]) can also return its game color using {{tlc|hl2|col}} → {{hl2|col}}. That approach is much cleaner because {{tl2|game color}} uses a huge switch statement that also uses templates as keys (such as "{{tlc|hl2}}"); This means that every page using {{tl2|game color}} creates an entry in the "What links here" list for all game icon templates | {{tip|Every game icon template (such as {{tl2|hl2}}, see [[:Category: Game icons]]) can also return its game color using {{tlc|hl2|col}} → {{hl2|col}}. That approach is much cleaner because {{tl2|game color}} uses a huge switch statement that also uses templates as keys (such as "{{tlc|hl2}}"); This means that every page using {{tl2|game color}} creates an entry in the "What links here" list for all game icon templates used.}} | ||
===Examples=== | ===Examples=== |
Revision as of 20:44, 12 October 2023

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.
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.

{{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 | |
|
→ |
|
See Also