Template:RoB color: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
(+ result_none (Infobox))
(Less bright sweeping color (general readability).)
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly
<includeonly


>{{#if:{{{1|}}}
><!--
 
  NOTES:
  - Keep colour-name vs Keyword identical in both switch cases. (Foreground colour that is)
  - Switch-1 cases also go into Switch-2 block. (using switch-1 foreground colour name) (example cases excluded)
  - Reverse is not required, unless related Keyword is actually (going to be) used as such.
 
-->{{#if:{{{1|}}}
|  {{#if:{{{2|}}}
|  {{#if:{{{2|}}}
     |  {{#switch:{{trim | {{{1|}}} }}
     |  {{#switch:{{trim | {{{1}}} }}
        |
         | alt-name-example
         | alt-name-example
         | name-example = {{ Font color | fg = white | bg = gray | text = {{{2}}} }}
         | name-example =   {{ Font color | fg = White | bg = Gray | text = {{{2}}} }}
         | result_none  = {{ Font color | fg = gray | bg =      | text = {{{2}}} }}
        |
         | striking    = {{ Font color | fg = green | bg =      | text = {{{2}}} }}
         | result_none  = <i>{{ Font color | fg = Gray | bg =      | text = {{{2}}} }}</i>
         | backhanded  = {{ Font color | fg = blue | bg =      | text = {{{2}}} }}
        |
         | sweeping    = {{ Font color | fg = gold | bg =      | text = {{{2}}} }}
         | striking    =   {{ Font color | fg = Green | bg =      | text = {{{2}}} }}
         | oppressive  = {{ Font color | fg = red   | bg =      | text = {{{2}}} }}
         | backhanded  =   {{ Font color | fg = Blue | bg =      | text = {{{2}}} }}
         | sweeping    =   {{ Font color | fg = &#35;CCAA00 | bg =      | text = {{{2}}} }}
         | oppressive  =   {{ Font color | fg = Red   | bg =      | text = {{{2}}} }}
        |
        | #default = {{ambox|type=delete|text=<b>Template Warning:</b> RoB_color.<br> Parameter 1 (<i>color scheme name</i>): Used colour scheme name (<i>{{{1}}}</i>) not found.}}
        }}
    |  {{#switch:{{trim | {{{1}}} }}
        |
        | outdated    = &#35;FFCCFF
        | shareddata  = &#35;F0F0F8
        | pagename    = DarkSlateGray
        |
        | none
        | zero
        | result_none  = Gray
        |
        | striking    = Green
        | backhanded  = Blue
        | sweeping    = &#35;CCAA00
        | oppressive  = Red
        |
        | infoboxheader = &#35;3366CC
        | infoboxsection = &#35;6699FF
        | infoboxfoother = &#35;aaaaaa
        |
        | AGI = &#35;929AFB
        | CHA = &#35;79FFA5
        | CON = &#35;FC91DF
        | DEX = &#35;FEE9B9
        | INT = &#35;B6E0F5
        | PER = &#35;FFCE92
        | PSY = &#35;D39BFF
        | STR = &#35;F4938C
        | WIL = &#35;D8F45A
        |
         | #default = {{ambox|type=delete|text=<b>Template Warning:</b> RoB_color.<br> Parameter 1 (<i>color scheme name</i>): Used colour scheme name (<i>{{{1}}}</i>) not found.}}
         | #default = {{ambox|type=delete|text=<b>Template Warning:</b> RoB_color.<br> Parameter 1 (<i>color scheme name</i>): Used colour scheme name (<i>{{{1}}}</i>) not found.}}
         }}
         }}
    | {{ambox|type=delete|text=<b>Template Warning:</b> RoB_color,<br> Parameter 2 (<i>text</i>): Is required, but was Empty.}}
     }}
     }}
| {{ambox|type=delete|text=<b>Template Warning:</b> RoB_color,<br> Parameter 1 (<i>color scheme name</i>): Is required, but was Empty.}}
| {{ambox|type=delete|text=<b>Template Warning:</b> RoB_color,<br> Parameter 1 (<i>color scheme name</i>): Is required, but was Empty.}}
}}</includeonly
}}</includeonly


><noinclude>{{documentation}}</noinclude>
><noinclude><!--
;Debug-Preview
1) {{ {{PAGENAME}} }}<br>
2) {{ {{PAGENAME}}|striking}}<br>
3) {{ {{PAGENAME}}|striking|striking}}<br>
4) {{ {{PAGENAME}}|shareddata}}<br>
-->{{documentation}}</noinclude>

Latest revision as of 12:16, 21 December 2023

Template documentation (for the template shown above, sometimes hidden or invisible)
Generals
Colour text based on a scheme name (instead of having to specify the colours per individual "Font_Color" call).
Intended to be used for recurring text colouring of wiki-wide stuff.
(currently all, but the "name-example" case, don't use any specific background color.)
When adding new colour schemes: take care of proper naming, and also add it to the Doc page.
Active colours: When no text is specified returns just the global used color name. (ie: no additional styling supplied)
Active colours
Name Preview
Combat Moves
backhanded Blue
oppressive Red
striking Green
sweeping #CCAA00
Infobox
result_none Gray
Infobox
infoboxheader #3366CC
infoboxsection #6699FF
infoboxfoother #aaaaaa
FEP's
AGI #929AFB
CON #FC91DF
CHA #79FFA5
DEX #FEE9B9
INT #B6E0F5
PER #FFCE92
PSY #D39BFF
STR #F4938C
WIL #D8F45A
(Other)
shareddata #F0F0F8
outdated #FFCCFF
pagename DarkSlateGray
Active colour schemes
Name Preview
Combat Moves
backhanded text text text
oppressive text text text
striking text text text
sweeping text text text
Infobox
result_none text text text
(Other)
(full lower case names, exception FEP tags.)


Usage preview's.
1) {{RoB color}} :
Wiki-deletion.png

Template Warning: RoB_color,
Parameter 1 (color scheme name): Is required, but was Empty.

2) {{RoB color | }} :
Wiki-deletion.png

Template Warning: RoB_color,
Parameter 1 (color scheme name): Is required, but was Empty.

3) {{RoB color | foobar | }} :
Wiki-deletion.png

Template Warning: RoB_color.
Parameter 1 (color scheme name): Used colour scheme name ( foobar ) not found.

4) {{RoB color | name-example | text text text }} : text text text

5) {{RoB color | alt-name-example | text text text }} : text text text

6) {{RoB color | striking | text text text }} : text text text

7) {{RoB color | foobar | text text text }} :
Wiki-deletion.png

Template Warning: RoB_color.
Parameter 1 (color scheme name): Used colour scheme name ( foobar ) not found.


Known issue.
7b) On indented line (no fix known yet)
: ... {{RoB color | foobar | text text text }} :
Wiki-deletion.png

Template Warning: RoB_color.
Parameter 1 (color scheme name): Used colour scheme name ( foobar ) not found.


Visit Template:RoB color/doc to edit this text! (How does this work?)