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: Difference between revisions

Template page
Undo revision 293489127 by 88.202.177.244 (talk)
No edit summary
Line 1: Line 1:
[[File:Blümchen53.JPG|500px|center]]
<span style="background:{{{bg|transparent}}};{{#invoke:String|replace|color:{{#switch:{{{1}}}|b=#000|w=#FFF|=red|{{{1}}}}};{{{css|}}}|[
<span style="background:{{{bg|transparent}}};{{#invoke:String|replace|color:{{#switch:{{{1}}}|b=#000|w=#FFF|=red|{{{1}}}}};{{{css|}}}|[
]||plain=false}}" title="{{{title|{{{bg|transparent}}}}}}">{{{2|{{0|!}}}}}</span><noinclude>
]||plain=false}}" title="{{{title|{{{bg|transparent}}}}}}">{{{2|{{0|!}}}}}</span><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 12:34, 25 March 2018

File:Blümchen53.JPG

!

Template documentation[ view · edit · history · purge ]
This documentation is transcluded from Template:Color/doc.

  • coloring of text,
  • drawing boxes,
  • tooltipping

Usage

{{Color |2= |style or css= }}

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)
File:Blümchen53.JPG
red
optional
2text, in any wiki notationemptyrequired
bg
3
color of the background, in any valid notation:
CSS color name, #RGB, tincture name
transparentoptional
title
4
any text to be tooltipped"bg" valueoptional
style or css
5
additional CSS style attributes, as e.g. border and paddingemptyoptional
b or bold
6
specification of font-weight: normal/bold (lighter/bolder)
or numeric value 100...900 where normal=400 and bold=7001
normal
0400
optional

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

Localization

This template is not intended to be localized.


Usage: {{Color|color|text}}

Examples:

example text

example text

example text

box without tooltip

Short forms:

default color

black color

white color

0#FBBD460

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

XX   or   {{Color||{{0|00}}|bg=#0a0}} →
File:Blümchen53.JPG
00   or   the shortest form {{Cbox|#CCC}} →
File:Blümchen53.JPG

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
File:Blümchen53.JPG

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}} →
File:Blümchen53.JPG

padded box


For colors see: Web colors. Three-digit hexadecimal color tables are shown there.

The
File:Blümchen53.JPG

bg-color is tooltipped — move the cursor to the field to see

Font-weight

can be specified either with

  • 6 = b sets a font-weight of bold (graduation 700)
    6 = bold sets a font-weight of bold (graduation 900)

or with the keyword (parameter name) "b" or "bold"

  • b = any of the parameter values normal, bold, lighter, bolder, 100, 200, ... 900

The specifications 6=b, b=bold, bold=bold, b=700, bold=700 are equivalent;
it can as well be specified with style=font-weigth:bold or css=font-weight:700.

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