Template:Outline color/doc: Difference between revisions

From Dothack Wikipedia
Jump to navigation Jump to search
(Created page with "{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> ==Description== This template displays text with a colored outline. It's basic use is thus: <code><nowiki>{{outline color|This text is outlined in gold}}</nowiki></code>, which comes out as: {{outline color|This text is outlined in gold}} Other colors can be specified but the default is a gold 2px solid outline wi...")
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->


Line 18: Line 18:
<code><nowiki>{{outline color|text|color|strength=1..3}}</nowiki></code>  
<code><nowiki>{{outline color|text|color|strength=1..3}}</nowiki></code>  


{{TemplateDataHeader}}
 
<templatedata>{
{| class="wikitable"
  "description": "Displays text with a colored outline.",
|+ Template parameters
  "params": {
|-
    "1": {
! Parameter !! !! Description !! Type !! Status
      "label": "Text",
|-
      "description": "The string to be outlined.",
| Text || 1 || The string to be outlined || String || '''required'''
      "type": "string",
|-
      "required": true
| Color || 2 || The outline color. Can be specified as a named web color or the standard 6-digit or 3-digit hexadecimal codes. If this parameter is not specified a default value of #FFD700 is used which is gold.<br/> Default <br/> #FFD700 || String || optional
    },
|-
    "2": {
| Strength || 3 || An optional parameter that in the range 1..3 allows the outline to be blended at customised strength levels. A value of 0 produces no outline. If this parameter is any other value, or is not specified, then the default option is a solid 2px outline with no blending which produces a strong outline || String || optional
      "label": "Color",
|}
      "description": "The outline color. Can be specified as a named web color or the standard 6-digit or 3-digit hexadecimal codes. If this parameter is not specified a default value of #FFD700 is used which is gold.",
 
      "type": "string",
      "default": "#FFD700",
      "required": false
    },
    "3": {
      "label": "Strength",
      "description": "An optional parameter that in the range 1..3 allows the outline to be blended at customised strength levels. A value of 0 produces no outline. If this parameter is any other value, or is not specified, then the default option is a solid 2px outline with no blending which produces a strong outline",
      "type": "string",
      "required": false
    }
  }
}</templatedata>


===Usage===
===Usage===
Line 57: Line 45:
Example showing outlining of bolded wikilink:
Example showing outlining of bolded wikilink:


*<code><nowiki>{{Outline color|'''[[ACT and Southern NSW Rugby Union]]'''|gold}}</nowiki></code><br/> → {{Outline color|'''[[ACT and Southern NSW Rugby Union]]'''|gold}}
*<code><nowiki>{{Outline color|'''[[Name]]'''|gold}}</nowiki></code><br/> → {{Outline color|'''[[Name]]'''|gold}}


Example showing outlining of bolded wikilink with colored text:
Example showing outlining of bolded wikilink with colored text:


*<code><nowiki>[[Waikato Chiefs|<span style= "color:#ff0;">{{Outline color|'''Chiefs'''|red|strength=3}}</span>]]</nowiki></code><br/> → [[Waikato Chiefs|<span style= "color:#ff0;">{{Outline color|'''Chiefs'''|red|strength=3}}</span>]]
*<code><nowiki>[[Rare|<span style="color:yellow">{{Outline color|Rare|black|strength=3}}</span>]]</nowiki></code><br/> → [[Rare|<span style="color:yellow">{{Outline color|'''Rare'''|black|strength=3}}</span>]]
 
==See also==
*[[Template:Swatch inline]] — displays text with a background in a solid color
 
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Text color templates]]
 
}}</includeonly>

Latest revision as of 11:13, 8 November 2022


Description

This template displays text with a colored outline. It's basic use is thus: {{outline color|This text is outlined in gold}}, which comes out as: This text is outlined in gold

Other colors can be specified but the default is a gold 2px solid outline with no blending. An optional strength parameter also allows customised blending at three strength levels.

Usage

{{outline color|text}}

or

{{outline color|text|color}}

or

{{outline color|text|color|strength=1..3}}


Template parameters
Parameter Description Type Status
Text 1 The string to be outlined String required
Color 2 The outline color. Can be specified as a named web color or the standard 6-digit or 3-digit hexadecimal codes. If this parameter is not specified a default value of #FFD700 is used which is gold.
Default
#FFD700
String optional
Strength 3 An optional parameter that in the range 1..3 allows the outline to be blended at customised strength levels. A value of 0 produces no outline. If this parameter is any other value, or is not specified, then the default option is a solid 2px outline with no blending which produces a strong outline String optional


Usage

Examples ranging from solid 2px outline to no outline:

  • {{Outline color|Outline in default color}}
    Outline in default color
  • {{Outline color|Outline in #FF69B4|#FF69B4}}
    Outline in #FF69B4
  • {{Outline color|Outline in red|red}}
    Outline in red
  • {{Outline color|Outline in red|red|strength=3}}
    → <span style= "text-shadow: red 0px 0px 1px Lua error: Internal error: The interpreter has terminated with signal "11".;">Outline in red
  • {{Outline color|Outline in red|red|strength=2}}
    → <span style= "text-shadow: red 0px 0px 1px Lua error: Internal error: The interpreter has terminated with signal "11".;">Outline in red
  • {{Outline color|Outline in red|red|strength=1}}
    → <span style= "text-shadow: red 0px 0px 1px Lua error: Internal error: The interpreter has terminated with signal "11".;">Outline in red
  • {{Outline color|Outline in red|red|strength=0}}
    Outline in red

Example showing outlining of bolded wikilink:

  • {{Outline color|'''[[Name]]'''|gold}}
    Name

Example showing outlining of bolded wikilink with colored text: