Template:Color/doc: Difference between revisions
More actions
docu |
mNo edit summary |
||
| Line 27: | Line 27: | ||
*drawing boxes, | *drawing boxes, | ||
*tooltipping | *tooltipping | ||
|namespace = | |namespace = any | ||
|usergroup = | |usergroup = any | ||
|placement = inline | |placement = inline | ||
}} | }} | ||
| Line 53: | Line 39: | ||
* <nowiki>{{</nowiki>color|#00F|example text}} → {{color|#00F|example text|bg=none}} | * <nowiki>{{</nowiki>color|#00F|example text}} → {{color|#00F|example text|bg=none}} | ||
* <nowiki>{{</nowiki>color|white|example text|bg=black}} → {{color|white|bg=black|example text}} | * <nowiki>{{</nowiki>color|white|example text|bg=black}} → {{color|white|bg=black|example text}} | ||
'''Short formes:''' | |||
* <nowiki>{{</nowiki>color|b|example text}} → {{color|b|example text}} | |||
* <nowiki>{{</nowiki>color|w|example text|bg=purple}} → {{color|w|example text|bg=purple}} | |||
Revision as of 06:10, 21 May 2014
- coloring of text,
- drawing boxes,
- tooltipping
Usage
{{Color |2= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | color of the text, in any notation "b" as a short form for "black" (#000) "w" as a short form for "white" (#FFFFFF) | red | optional | |
2 | text, in any notation | empty | required | |
bg | color of the background, in any notation | transparent | optional | |
title | any text to be tooltipped | the "bg" parameter | optional | |
css | additional CSS attributes | empty | optional | |
Additional information
The template is intended to be used in the following namespaces: unknown
The template is intended to be used by the following user groups: no user group specified
Placement:
inline
Usage: {{color|color|text}}
Examples:
- {{color|red|example text}} → example text
- {{color|#00F|example text}} → example text
- {{color|white|example text|bg=black}} → example text
Short formes:
- {{color|b|example text}} → example text
- {{color|w|example text|bg=purple}} → example text
To draw just a color box with bg-color use it like
- {{Color||{{0|00}}|bg=#0a0}} → or {{Color|1=#F0F|2=XX|bg=#F0F}} → XX or {{Cbox|#CCC}} →
To just tooltip a text use it like
The <u>{{color|#000|underlined text|title=tooltip example}}</u> is ''{{W|tooltip}}ped'' : The underlined text is tooltipped.
It is also possible to define additional CSS data, e.g.
{{color|#000|'''color box text'''|bg=#CFC|css=border:2px dotted #F80|title=color box example}} → color box text
For colors see: Web colors. Three-digit hexadecimal color tables are shown there.
The bg-color is tooltipped — move the cursor to the field to see