Template:Flag-auto: Difference between revisions

From Polcompball Wiki
Jump to navigationJump to search
Content added Content deleted
No edit summary
No edit summary
Line 5: Line 5:
! RGB
! RGB
|-
|-
{{#if:{{{color1-name|}}}|
{{#if:{{{c1|}}}|
{{!}} style="background:{{{color1-hex}}}; width:1em" {{!}}
{{!}} style="background:{{{c1}}}; width:1em" {{!}}
{{!}} align="left" {{!}} {{{color1-name}}}
{{!}} align="left" {{!}} {{{c1}}}
{{!}} {{{color1-hex}}}
{{!}} {{{h1}}}
{{!}} {{#invoke:Hex2rgb|hex2rgb|{{{color1-hex}}}}}
{{!}} {{#invoke:Hex2rgb|hex2rgb|{{{h1}}}}}
}}
}}
|}</includeonly>
|}</includeonly>

Revision as of 19:29, 4 January 2021


Description

To use this template, add the {{Flag-auto}} template and fill in the appropriate fields. Fields left blank will not appear in articles. This template uses Fandom's table syntax.

Syntax

{{Flag-auto
|c1 =
|h1 =
|c2 =
|h2 =
|c3 =
|h3 =
|c4 =
|h4 =
|c5 =
|h5 =
|c6 =
|h6 =
|c7 =
|h7 =
|c8 =
|h8 =
|c9 =
|h9 =
|c10=
|h10=
}}

Sample output

Color Name HEX RGB
Red #FF0000 255, 0, 0
{{Flag-auto
|c1 = Red
|h1 = #FF0000
|c2 = Black
|h2 = #202020
|c3 = White
|h3 = #FFFFFF
|c4 = Yellow
|h4 = #FFFF00
|c5 = Green
|h5 = #00FF00
|c6 = Blue 
|h6 = #0000FF
}}