Template:NestTextColors
Jump to navigation
Jump to search
Usage
[edit]This template is not used
- This template displays an error message when not given sufficient parameters
- (It needs three arguments min. two colors followed by text), and the error message is suppressed whilst this page is viewed directly.
This documentation is transcluded from Template:NestTextColors/doc.
Usage
[edit]- Purpose
- This template is a template work around for incompatible behaviors in Template:Fs (talk, backlinks, edit), nested in conjunction with Template:TextColors (talk, backlinks, edit) (A wikitable delimited form, used to develop this 'div style' version).
- where parameter "|border=various"
- ... allows a variety of add on style effects, such as padding and borders --- normal legal HTML inside 'div style' blocks.
- wherein arguments #'s
(1) and (2) - Set foreground and background colors of the given block of text respectfully. They can be specified by name or in the format #dddddd (RGB hex triplet).
(3) - is the text to be displayed inside a colorized block, ommision of which leaves the 'bright' error message shown above. In general, most other templates will work within this field. However, some may not parse properly due to template nesting arcana.
(4) - is the optional div block width perameter. (default is full width, or 100%)
(5) - is an optional Font Size perameter. (default is very small, or Font Size 1)
- Cautions
- One can include templates and links within, but templates with a 'define perameter' section using an equals sign will break during parsing the template.
Subst the desired content first instead, and enclose that. - The message data must be one continuous unbroken line-- do not include newlines in the text.
- Unless in the case of personal use on a user page,
use this template with great caution:- a poor contrast may make the text difficult or impossible to read
- the contrast can be experienced as even poorer in the case of color blindness
- links have a color according to user settings; they become invisible if this color is equal to the background color
- Template guts
( '//' means manually wrapped for clarity) <font size={{{5|3}}}> // <div style="color:{{{1|red}}}; background:{{{2|yellow}}}; // width:{{{4|100}}}%; {{{border|}}};"> // {{{3|Error: message.}}}</div></font>
- Examples
{{NestTextColors|#000000|#ffffff|From {{W|Wikipedia}}, the free {{W|encyclopedia}}. (black on white, 100% width, medium font size, [Note the missing fourth perameter,defaults to 100% width --->] --->)||3}} gives:
From Wikipedia, the free encyclopedia. (black on white, 100% width, medium font size,
[Note the missing fourth perameter]))
ex-2) {{NestTextColors|#aa0000|#009999|From {{W|Wikipedia}}, the free {{W|encyclopedia}}. (A red hue on 50%, small font)|50}} gives:From Wikipedia, the free encyclopedia. (A red hue on 50%, small font)
ex-3) {{NestTextColors|Green|cyan|From {{W|Wikipedia}}, the free {{W|encyclopedia}}. (Green on Cyan, 75% width, medium small font size) |75|2}} gives:From Wikipedia, the free encyclopedia. (Green on Cyan, 75% width, 'medium-small' font size)
ex-4) <div style="float:right">{{NestTextColors|yellow|grey|From {{W|Wikipedia}}, the free {{W|encyclopedia}}. (Yellow on Grey, 75%, Medium-large font size) |75|4}}</div> gives:From Wikipedia, the free encyclopedia. (Yellow on Grey, 75%, Medium-large font size)
From Wikipedia, the free encyclopedia.
ex-6) <center>{{NestTextColors|grey|yellow|From {{W|Wikipedia}}, the free {{W|encyclopedia}}.|50|3}}</center> gives:From Wikipedia, the free encyclopedia.
From Wikipedia, the free encyclopedia.
- Users are cautioned
- that browser font sizes and rendering may differ significantly between browsers, and are urged to check the resultant effects on using this template on both IE6 and non-IE6 browsers.
Standard color names
[edit]The HTML 4.01 specification defines sixteen named colors, as follows:
Color | Hexadecimal | Color | Hexadecimal |
---|---|---|---|
black | #000000 | silver | #c0c0c0 |
gray | #808080 | white | #ffffff |
maroon | #800000 | red | #ff0000 |
purple | #800080 | fuchsia | #ff00ff |
green | #008000 | lime | #00ff00 |
olive | #808000 | yellow | #ffff00 |
navy | #000080 | blue | #0000ff |
teal | #008080 | aqua | #00ffff |
See also: