Difference between revisions of "Template:TeamAbbrToColor"

From Golly.Life Wiki

Line 1: Line 1:
 
<includeonly>{{#switch: {{{1}}}<!--
 
<includeonly>{{#switch: {{{1}}}<!--
-->|AA=<nowiki>#ff1717</nowiki><!--
+
-->|AA=<nowiki>ff1717</nowiki><!--
-->|ATL=<nowiki>#697a21</nowiki><!--
+
-->|ATL=<nowiki>697a21</nowiki><!--
-->|BTX=<nowiki>#3e92cc</nowiki><!--
+
-->|BTX=<nowiki>3e92cc</nowiki><!--
-->|DECO=<nowiki>#a0e7e8</nowiki><!--
+
-->|DECO=<nowiki>a0e7e8</nowiki><!--
-->|DET=<nowiki>#9963ab</nowiki><!--
+
-->|DET=<nowiki>9963ab</nowiki><!--
-->|EA=<nowiki>#a0e7e5</nowiki><!--
+
-->|EA=<nowiki>a0e7e5</nowiki><!--
-->|FWPT=<nowiki>#ef6f6c</nowiki><!--
+
-->|FWPT=<nowiki>ef6f6c</nowiki><!--
-->|OSHA=<nowiki>#53917e</nowiki><!--
+
-->|OSHA=<nowiki>53917e</nowiki><!--
-->|LBFB=<nowiki>#f2c57c</nowiki><!--
+
-->|LBFB=<nowiki>f2c57c</nowiki><!--
-->|MILF=<nowiki>#ff66cc</nowiki><!--
+
-->|MILF=<nowiki>ff66cc</nowiki><!--
-->|ORL=<nowiki>#0dab76</nowiki><!--
+
-->|ORL=<nowiki>0dab76</nowiki><!--
-->|SAC=<nowiki>#ffb627</nowiki><!--
+
-->|SAC=<nowiki>ffb627</nowiki><!--
-->|SDBA=<nowiki>#f08700</nowiki><!--
+
-->|SDBA=<nowiki>f08700</nowiki><!--
-->|SFBS=<nowiki>#e7d7c1</nowiki><!--
+
-->|SFBS=<nowiki>e7d7c1</nowiki><!--
-->|SS=<nowiki>#e86215</nowiki><!--
+
-->|SS=<nowiki>e86215</nowiki><!--
-->|TB=<nowiki>#bb0000</nowiki><!--
+
-->|TB=<nowiki>bb0000</nowiki><!--
 
-->}}</includeonly><noinclude>
 
-->}}</includeonly><noinclude>
 
This is a switch that takes a capitalized team abbreviation as an input and returns the hex color of the team.
 
This is a switch that takes a capitalized team abbreviation as an input and returns the hex color of the team.
 +
 +
This returns the color WITHOUT the hash sign. This means it is useful for DISPLAY PURPOSES ONLY.
 +
 +
If you want the color WITH the hash sign, for actually coloring things, see {{Tl|TeamAbbrToHexColor}}
 +
 +
  
 
This is useful for coloring tables and for using with {{Tl|HexColor}}:
 
This is useful for coloring tables and for using with {{Tl|HexColor}}:
Line 27: Line 33:
 
{{HexColor|{{TeamAbbrToColor|SS}}}}
 
{{HexColor|{{TeamAbbrToColor|SS}}}}
  
 
 
Example: <code><nowiki>{{TeamAbbrToColor|SS}}</nowiki></code> returns
 
 
{|class="wikitable"
 
!Column 1
 
!Column 2
 
|-
 
|style="background-color: {{TeamAbbrToColor|AA}};" | The Arsonists
 
|style="background-color: {{TeamAbbrToColor|BTX}};" | The Texas
 
|}
 
 
<pre>
 
{{TeamAbbrToColor|SS}}
 
</pre>
 
 
</noinclude>
 
</noinclude>

Revision as of 23:41, 10 February 2021

This is a switch that takes a capitalized team abbreviation as an input and returns the hex color of the team.

This returns the color WITHOUT the hash sign. This means it is useful for DISPLAY PURPOSES ONLY.

If you want the color WITH the hash sign, for actually coloring things, see {{TeamAbbrToHexColor}}


This is useful for coloring tables and for using with {{HexColor}}:

{{HexColor|{{TeamAbbrToColor|SS}}}}

#e86215