Template:Colorsample

From Fleet
Revision as of 13:14, 17 April 2012 by Fox (talk | contribs) (Created page with "<span style="{{#if:{{{color|}}{|color:{{{color}}};}}display:inline-block;{{#if:{{{height|}}{|height:{{{height}}};}}border:{{{border|1px solid black}}};background:{{{1}}}">{{{t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

    

Usage

{{Colorsample|COLOR}}

or {{Colorsample|COLOR|text=TEXT|border=BORDER|height=HEIGHT|color=TEXTCOLOR}}

COLOR should be specified but all the named parameters are optional.

COLOR can be any CSS specification for a color.

If height is not specified, then the height will be determined by the current font size.

Default values:

  • TEXT: &nbsp;&nbsp;&nbsp;&nbsp; (i.e. four non-breaking spaces)
  • BORDER: 1px solid black
  • TEXTCOLOR: black

Examples

{{Colorsample|RED}} produces     

{{Colorsample|#00FF00|text=foreground}} produces foreground

{{Colorsample|#00FF00|text=foreground|color=red}} produces foreground

{{Colorsample|{{rgb|bronze}}}} produces     

{{Colorsample|blue|text={{0|000000000}}}} produces 000000000

See also