Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Color/doc: Difference between revisions

Template page
m Reverted edits by Jjacart (talk) to last revision by Perhelion
mNo edit summary
Line 43: Line 43:
* <nowiki>{{color|#000|box ''without'' tooltip|css=border:1px solid #7F7|title=}}</nowiki> → {{color|#000|box ''without'' tooltip|css=border:1px solid #7F7|title=}}
* <nowiki>{{color|#000|box ''without'' tooltip|css=border:1px solid #7F7|title=}}</nowiki> → {{color|#000|box ''without'' tooltip|css=border:1px solid #7F7|title=}}


'''Short formes:'''
'''Short forms:'''
* <nowiki>{{</nowiki>color||default color|bg=cyan}} → {{color||default color|bg=cyan}}  
* <nowiki>{{</nowiki>color||default color|bg=cyan}} → {{color||default color|bg=cyan}}  
* <nowiki>{{</nowiki>color|b|black color|bg=gold}} → {{color|b|black color|bg=gold}}  
* <nowiki>{{</nowiki>color|b|black color|bg=gold}} → {{color|b|black color|bg=gold}}  
Line 49: Line 49:




To draw just a ''color '''box''''' with ''bg''-color use it like
To draw just a ''color '''box''''' with ''bg''-color, use it like
* <nowiki>{{</nowiki>Color||<nowiki>{{</nowiki>0|00}}|bg=#0a0}} → {{color||{{0|00}}|bg=#0a0}} &ensp; or &ensp; <nowiki>{{</nowiki>Color|1=#F0F|2=XX|bg=#F0F}} → {{color|1=#F0F|2=XX|bg=#F0F}} &ensp; or &ensp; {{Tlx|Cbox|#CCC}} → {{cbox|#ccc}}
* <nowiki>{{</nowiki>Color||<nowiki>{{</nowiki>0|00}}|bg=#0a0}} → {{color||{{0|00}}|bg=#0a0}} &ensp; or &ensp; <nowiki>{{</nowiki>Color|1=#F0F|2=XX|bg=#F0F}} → {{color|1=#F0F|2=XX|bg=#F0F}} &ensp; or &ensp; {{Tlx|Cbox|#CCC}} → {{cbox|#ccc}}




To just '''''tooltip''''' a text use it like<br>
To just '''''tooltip''''' a text, use it like<br>
<nowiki>The <u>{{color|#000|underlined text|title=tooltip example}}</u> is ''{{W|tooltip}}ped'' </nowiki>: {{0}} The <u>{{color|#000|underlined text|title=tooltip example}}</u> is ''{{W|tooltip}}ped''.   
<nowiki>The <u>{{color|#000|underlined text|title=tooltip example}}</u> is ''{{W|tooltip}}ped'' </nowiki>: {{0}} The <u>{{color|#000|underlined text|title=tooltip example}}</u> is ''{{W|tooltip}}ped''.   



Revision as of 05:09, 27 July 2018

  • coloring of text,
  • drawing boxes,
  • tooltipping

Usage

{{Color |2= }}

Template parameters

ParameterDescriptionDefaultStatus
1color of the text, in any valid notation, plus
"b" as a short form for "black" (#000000)
"w" as a short form for "white" (#FFFFFF)
redoptional
2text, in any wiki notationemptyrequired
bgcolor of the background, in any valid notationtransparentoptional
titleany text to be tooltipped"bg" valueoptional
cssadditional CSS attributesemptyoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

See also


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
  • {{color|#000|box ''without'' tooltip|css=border:1px solid #7F7|title=}} → box without tooltip

Short forms:

  • {{color||default color|bg=cyan}} → default color
  • {{color|b|black color|bg=gold}} → black color
  • {{color|w|white color|bg=purple}} → white color


To draw just a color box with bg-color, use it like

  • {{Color||{{0|00}}|bg=#0a0}} → 00   or   {{Color|1=#F0F|2=XX|bg=#F0F}} → XX   or   {{Cbox|#CCC}} → 00


To just tooltip a text, use it like
The <u>{{color|#000|underlined text|title=tooltip example}}</u> is ''{{W|tooltip}}ped'' : 0 The underlined text is tooltipped.


It is also possible to define additional CSS data, e.g.
{{color|b|'''padded box'''|bg=#CFC|css=border:2px dotted #F80;padding:0 8px|title=CSS example}} → padded box


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

Cookies help us deliver our services. By using our services, you agree to our use of cookies.