You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

Template:Rgb: Difference between revisions

From MafiaWiki
Jump to navigation Jump to search
(→‎Usage: slight terminology change)
(add colors, reformat table,)
Line 1: Line 1:
<includeonly>#{{ #switch:{{{1}}}
<includeonly>#{{ #switch:{{{1}}}
| blue=00a
| ltred=f33
| lred=f33
| red=f00
| darkred=8b0000
| dred=8b0000
| yellow=ff0
| orange=ffa500
| olive=808000
| ltblue=00f
| lblue=00f  
| lblue=00f  
| dblue=005
| blue=00f
| red=a00
| darkblue=00008b
| lred=f00
| dblue=00008b
| dred=500
| ltgreen=0f0
| lgreen=0f0
| green=0a0  
| green=0a0  
| lgreen=0f0
| darkgreen=050
| dgreen=050
| dgreen=050
| yellow=ff0
| purple=a0a
| purple=a0a
| teal=0aa
| teal=0aa
| indigo=4b0082
| violet=ee82ee
| cyan=0ff
| black=000
| black=000
| white=fff
| white=fff
| gray=777
| gray=777
| gray=777
| brown=a52a2a
| {{{1}}} }}</includeonly>
| {{{1}}} }}</includeonly>
<noinclude>
<noinclude>
Returns the RGB color-code of named color. ''The colors returned by this template are '''not''' the same as the standard predefined CSS colors.''
Returns a RGB color-code for the named color. ''The colors returned by this template are '''not''' the same as the standard predefined HTML/CSS colors.''


== Usage ==
== Usage ==
Line 23: Line 36:
{{rgb|colorname}}
{{rgb|colorname}}
</pre>
</pre>
''colorname'' is the name of the desired color. Entering an RGB code without a leading # will simply pre-pend the # symbol. Entering an RGB code ''with'' a leading # symbol should not be attempted; simply enter that code directly. Doing so within this template will always result in white.
''colorname'' is the name of the desired color. Entering an RGB code without a leading # will simply pre-pend the # symbol. Entering an RGB code ''with'' a leading # symbol should not be attempted; simply enter that code directly. ''Doing so within this template will always result in white.''


=== Examples ===
=== Examples ===
Curently, the following colors are defined.
Curently, the following colors are defined.


{| border="1" cellpadding="2" cellspacing="0"
{| border="0" cellpadding="5" cellspacing="2"  
|- align=center
| width=150 | Color name
| width=70 | Example color
| width=150 | Color name
| width=70 | Example color
| width=150 | Color name
| width=70 | Example color
|- align=center
|
<pre>
{{rgb|blue}}
</pre>
|
<span style="background-color:{{rgb|blue}}">&emsp;&emsp;&emsp;</span>
|
<pre>
{{rgb|lblue}}
</pre>
|
<span style="background-color:{{rgb|lblue}}">&emsp;&emsp;&emsp;</span>
|
<pre>
{{rgb|dblue}}
</pre>
|
<span style="background-color:{{rgb|dblue}}">&emsp;&emsp;&emsp;</span>
|- align=center
|
<pre>
{{rgb|red}}
</pre>
|
<span style="background-color:{{rgb|red}}">&emsp;&emsp;&emsp;</span>
|
<pre>
{{rgb|lred}}
</pre>
|
<span style="background-color:{{rgb|lred}}">&emsp;&emsp;&emsp;</span>
|
<pre>
{{rgb|dred}}
</pre>
|
<span style="background-color:{{rgb|dred}}">&emsp;&emsp;&emsp;</span>
|- align=center
|- align=center
|
| Color - Example
<pre>
| Color - Example
{{rgb|green}}
|- align=left
</pre>
| <nowiki>{{rgb|ltred}}</nowiki> - <span style="background-color:{{rgb|ltred}}">&emsp;&emsp;&emsp;</span>
|
| <nowiki>{{rgb|red}}</nowiki> - <span style="background-color:{{rgb|red}}">&emsp;&emsp;&emsp;</span>
<span style="background-color:{{rgb|green}}">&emsp;&emsp;&emsp;</span>  
| <nowiki>{{rgb|darkred}}</nowiki> - <span style="background-color:{{rgb|darkred}}">&emsp;&emsp;&emsp;</span>
|
|-
<pre>
| <nowiki>{{rgb|yellow}}</nowiki> - <span style="background-color:{{rgb|yellow}}">&emsp;&emsp;&emsp;</span>
{{rgb|lgreen}}
| <nowiki>{{rgb|orange}}</nowiki> - <span style="background-color:{{rgb|orange}}">&emsp;&emsp;&emsp;</span>
</pre>
| <nowiki>{{rgb|olive}}</nowiki> - <span style="background-color:{{rgb|olive}}">&emsp;&emsp;&emsp;</span>
|
|-
<span style="background-color:{{rgb|lgreen}}">&emsp;&emsp;&emsp;</span>  
| <nowiki>{{rgb|ltblue}}</nowiki> - <span style="background-color:{{rgb|ltblue}}">&emsp;&emsp;&emsp;</span>
|
| <nowiki>{{rgb|blue}}</nowiki> - <span style="background-color:{{rgb|blue}}">&emsp;&emsp;&emsp;</span>
<pre>
| <nowiki>{{rgb|darkblue}}</nowiki> - <span style="background-color:{{rgb|darkblue}}">&emsp;&emsp;&emsp;</span>
{{rgb|dgreen}}
|-
</pre>
| <nowiki>{{rgb|ltgreen}}</nowiki> - <span style="background-color:{{rgb|ltgreen}}">&emsp;&emsp;&emsp;</span>
|
| <nowiki>{{rgb|green}}</nowiki> - <span style="background-color:{{rgb|green}}">&emsp;&emsp;&emsp;</span>
<span style="background-color:{{rgb|dgreen}}">&emsp;&emsp;&emsp;</span>  
| <nowiki>{{rgb|darkgreen}}</nowiki> - <span style="background-color:{{rgb|darkgreen}}">&emsp;&emsp;&emsp;</span>
|- align=center
|-
|
| <nowiki>{{rgb|purple}}</nowiki> - <span style="background-color:{{rgb|purple}}">&emsp;&emsp;&emsp;</span>
<pre>
| <nowiki>{{rgb|indigo}}</nowiki> - <span style="background-color:{{rgb|indigo}}">&emsp;&emsp;&emsp;</span>
{{rgb|yellow}}
| <nowiki>{{rgb|violet}}</nowiki> - <span style="background-color:{{rgb|violet}}">&emsp;&emsp;&emsp;</span>
</pre>
|-
|
| <nowiki>{{rgb|cyan}}</nowiki> - <span style="background-color:{{rgb|cyan}}">&emsp;&emsp;&emsp;</span>
<span style="background-color:{{rgb|yellow}}">&emsp;&emsp;&emsp;</span>
| <nowiki>{{rgb|teal}}</nowiki> - <span style="background-color:{{rgb|teal}}">&emsp;&emsp;&emsp;</span>
|
| <nowiki>{{rgb|brown}}</nowiki> - <span style="background-color:{{rgb|brown}}">&emsp;&emsp;&emsp;</span>
<pre>
|-
{{rgb|purple}}
| <nowiki>{{rgb|black}}</nowiki> - <span style="background-color:{{rgb|black}}">&emsp;&emsp;&emsp;</span>
</pre>
| <nowiki>{{rgb|gray}}</nowiki> - <span style="background-color:{{rgb|gray}}">&emsp;&emsp;&emsp;</span>
|
| <nowiki>{{rgb|white}}</nowiki> - <span style="background-color:{{rgb|white}}; border: 1px solid black;">&emsp;&emsp;&emsp;</span>
<span style="background-color:{{rgb|purple}}">&emsp;&emsp;&emsp;</span>
|
<pre>
{{rgb|teal}}
</pre>
|
<span style="background-color:{{rgb|teal}}">&emsp;&emsp;&emsp;</span>
|- align=center
|
<pre>
{{rgb|black}}
</pre>
|
<span style="background-color:{{rgb|black}}">&emsp;&emsp;&emsp;</span>
|
<pre>
{{rgb|white}}
</pre>
|
<span style="background-color:{{rgb|white}}">&emsp;&emsp;&emsp;</span>
|
<pre>
{{rgb|gray}}
</pre>
|
<span style="background-color:{{rgb|gray}}">&emsp;&emsp;&emsp;</span>
|- align=center
|
<pre>
{{rgb|0ad52c}}
</pre>
|
<span style="background-color:{{rgb|0ad52c}}">&emsp;&emsp;&emsp;</span>
|
<pre>
{{rgb|2b5}}
</pre>
|
<span style="background-color:{{rgb|2b5}}">&emsp;&emsp;&emsp;</span>
|
<pre>
{{rgb|0ad52c}}
</pre>
|
<span style="background-color:{{rgb|0ad52c}}">&emsp;&emsp;&emsp;</span>
|}
|}
[[Category:Templates|Rgb]]
[[Category:Templates|Rgb]]
</noinclude>
</noinclude>

Revision as of 17:41, 21 August 2007


Returns a RGB color-code for the named color. The colors returned by this template are not the same as the standard predefined HTML/CSS colors.

Usage

{{rgb|colorname}}

colorname is the name of the desired color. Entering an RGB code without a leading # will simply pre-pend the # symbol. Entering an RGB code with a leading # symbol should not be attempted; simply enter that code directly. Doing so within this template will always result in white.

Examples

Curently, the following colors are defined.

Color - Example Color - Example
{{rgb|ltred}} -     {{rgb|red}} -     {{rgb|darkred}} -    
{{rgb|yellow}} -     {{rgb|orange}} -     {{rgb|olive}} -    
{{rgb|ltblue}} -     {{rgb|blue}} -     {{rgb|darkblue}} -    
{{rgb|ltgreen}} -     {{rgb|green}} -     {{rgb|darkgreen}} -    
{{rgb|purple}} -     {{rgb|indigo}} -     {{rgb|violet}} -    
{{rgb|cyan}} -     {{rgb|teal}} -     {{rgb|brown}} -    
{{rgb|black}} -     {{rgb|gray}} -     {{rgb|white}} -