Difference between revisions of "Template:ColorBox/doc"

From WikiCorporates
Jump to navigation Jump to search
m (→‎Usage)
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
|Cat            - text in the box; otherwise an empty coloured square. Optional
 
|Cat            - text in the box; otherwise an empty coloured square. Optional
 
|Blue            - colour of the text inside the box. Optional
 
|Blue            - colour of the text inside the box. Optional
−
|border=#fff000  - colour of the border around the box. Optional; default is black.
+
|border=#fff000  - colour of the border around the box. Optional; default is the same colour as the bg.
 
}}
 
}}
 
</pre>
 
</pre>
Line 17: Line 17:
 
! Visual effect !! Markup
 
! Visual effect !! Markup
 
|-
 
|-
−
| {{ColorBox|green}} || <code><nowiki>{{ColorBox|Green}}</nowiki></code>
+
| {{ColorBox|green}} || <code><nowiki>{{ColorBox|green}}</nowiki></code>
 
|-
 
|-
−
| {{ColorBox|Yellow|Default color for this text}} || <code><nowiki>{{ColorBox|Yellow|Default color for this text}}</nowiki></code>
+
| {{ColorBox|yellow|Black for this text|black}} || <code><nowiki>{{ColorBox|yellow|Black for this text|black}}</nowiki></code>
 
|-
 
|-
−
| {{ColorBox|Blue|White color for this text|White}} || <code><nowiki>{{ColorBox|Blue|White color for this text|White}}</nowiki></code>
+
| {{ColorBox|blue|Default color for this text}} || <code><nowiki>{{ColorBox|blue|Default color for this text}}</nowiki></code>
 
|-
 
|-
−
| {{ColorBox|SteelBlue|'''Using X11 color names'''|Gold}} || <code><nowiki>{{ColorBox|SteelBlue|'''</nowiki>Using X11 color names<nowiki>'''|Gold}}</nowiki></code>
+
| {{ColorBox|steelblue|'''Using X11 color names'''|gold}} || <code><nowiki>{{ColorBox|steelblue|'''</nowiki>Using X11 color names<nowiki>'''|gold}}</nowiki></code>
 
|-
 
|-
 
| {{ColorBox|#012345|''Using RGB hex triplets''|#fedcba}} || <code><nowiki>{{ColorBox|#012345|''</nowiki>Using RGB hex triplets<nowiki>''|#fedcba}}</nowiki></code>
 
| {{ColorBox|#012345|''Using RGB hex triplets''|#fedcba}} || <code><nowiki>{{ColorBox|#012345|''</nowiki>Using RGB hex triplets<nowiki>''|#fedcba}}</nowiki></code>
 
|-
 
|-
−
| {{ColorBox|Yellow|Red|#f00|border=#f00}} || <code><nowiki>{{ColorBox|Yellow|Red|#f00|border=#f00}}</nowiki></code>
+
| {{ColorBox|yellow|Red|#f00|border=#f00}} || <code><nowiki>{{ColorBox|yellow|Red|#f00|border=#f00}}</nowiki></code>
 
|}
 
|}
  
 
Source: Copied from {{wpl|Template:Color_box}}
 
Source: Copied from {{wpl|Template:Color_box}}
−
<includeonly>[[Category:WikiPolitiks templates]]</includeonly>
+
<includeonly>[[Category:WikiCorporates templates]]</includeonly>

Latest revision as of 13:27, 30 May 2020

Template

Usage

{{ColorBox|colour|text|text colour|border colour}}

{{ColorBox
|Green           - background colour of the box
|Cat             - text in the box; otherwise an empty coloured square. Optional
|Blue            - colour of the text inside the box. Optional
|border=#fff000  - colour of the border around the box. Optional; default is the same colour as the bg.
}}
Examples
Visual effect Markup
     {{ColorBox|green}}
 Black for this text  {{ColorBox|yellow|Black for this text|black}}
 Default color for this text  {{ColorBox|blue|Default color for this text}}
 Using X11 color names  {{ColorBox|steelblue|'''Using X11 color names'''|gold}}
 Using RGB hex triplets  {{ColorBox|#012345|''Using RGB hex triplets''|#fedcba}}
 Red  {{ColorBox|yellow|Red|#f00|border=#f00}}

Source: Copied from Template:Color boxWikipedia-W.svg