Template:Color/doc: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<includeonly>Template doc page transcluded from {{SUBJECTPAGENAME}}/doc</includeonly><noinclude>Documentation for Template:Tweet</br></br></noinclude> <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> == Useage == To be used to color text. <pre>{{color|1|2}}</pre> <pre>{{color|color to change|text you are coloring}}</pre> == Parameters == {| class="wikitable" {{!}}- ! Parameter || Description || Type|| Status {{!}}- {{!}} 1 {{!!}} Desired color, either a [http...") |
m (update format and examples) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>Template doc page transcluded from {{SUBJECTPAGENAME}}/doc</includeonly><noinclude>Documentation for [[Template: | <includeonly>Template doc page transcluded from {{SUBJECTPAGENAME}}/doc</includeonly><noinclude>Documentation for [[Template:Color]]</br></br></noinclude> | ||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | ||
== Useage == | == Useage == | ||
To be used to color text. | To be used to color text, or the background of text. | ||
< | :<code><nowiki>{{color|1|2|3|4}}</nowiki></code> | ||
:<code><nowiki>{{color|text color|background color|background padding|text you are coloring}}</nowiki></code> | |||
== Parameters == | == Parameters == | ||
Line 13: | Line 14: | ||
! Parameter || Description || Type|| Status | ! Parameter || Description || Type|| Status | ||
{{!}}- | {{!}}- | ||
{{!}} 1 {{!!}} Desired color, either a [https://www.w3schools.com/tags/ref_colornames.asp color name] or Hex code. || content || | {{!}} 1 {{!!}} Desired '''text''' color, either a [https://www.w3schools.com/tags/ref_colornames.asp color name] or Hex code. Leaving blank will leave the color as the default text color. || content || optional | ||
{{!}}- | {{!}}- | ||
{{!}} 2 || Text that is being colored. || content || required | {{!}} 2 || Desired '''background''' color. Can either be an color name, or hex code. Leaving blank will leave the color as the default background color. || content || optional | ||
{{!}}- | |||
{{!}} 3 || Width of the padding of the background color. Useful for large highlights to avoid it looking too small. Default size of 2px. || content || required | |||
{{!}}- | |||
{{!}} 4 || Text that is being colored. || content || required | |||
|} | |} | ||
Line 21: | Line 26: | ||
Inputting the following: | Inputting the following: | ||
:<nowiki>{{color| | :<code><nowiki>{{color|blue|||This text is blue!}}</nowiki></code> | ||
Will result in the following: | Will result in the following: | ||
:{{color| | :{{color|blue|||This text is blue!}} | ||
---- | ---- | ||
Alternatively, a hex code for a non-html color can be used in order to specify a specific color. For example: | Alternatively, a hex code for a non-html color can be used in order to specify a specific color. For example: | ||
:<nowiki>{{color|# | :<code><nowiki>{{color|#1e92bd|||This is a random color!}}</nowiki></code> | ||
Will result in the following: | Will result in the following: | ||
:{{color|# | :{{color|#1e92bd|||This is a random color!}} | ||
---- | |||
Or even to add a highlight to a string of text: | |||
:<code><nowiki>This is {{color||yellow||important}} doccumentation.</nowiki></code> | |||
Which will result in the following: | |||
:This is {{color||yellow||important}} doccumentation. | |||
---- | ---- | ||
And, it can be used in close conjunction for rapid color changes: | And, it can be used in close conjunction for rapid color changes, and can be placed within one another: | ||
:<nowiki>{{color|red| | :<code><nowiki>{{color||lightgrey|{{color|red|||R}}{{color|orange|||A}}{{color|yellow|||I}}{{color|green|||N}}{{color|blue|||B}}{{color|indigo|||O}}{{color|violet|||W}}}}</nowiki></code> | ||
Which will result in the following: | Which will result in the following: | ||
:{{color|red| | :{{color||lightgrey|2px|{{color|red|||R}}{{color|orange|||A}}{{color|yellow|||I}}{{color|green|||N}}{{color|blue|||B}}{{color|indigo|||O}}{{color|violet|||W}}}} |
Latest revision as of 04:05, 20 March 2024
Documentation for Template:Color
Useage
To be used to color text, or the background of text.
{{color|1|2|3|4}}
{{color|text color|background color|background padding|text you are coloring}}
Parameters
Parameter | Description | Type | Status |
---|---|---|---|
1 | Desired text color, either a color name or Hex code. Leaving blank will leave the color as the default text color. | content | optional |
2 | Desired background color. Can either be an color name, or hex code. Leaving blank will leave the color as the default background color. | content | optional |
3 | Width of the padding of the background color. Useful for large highlights to avoid it looking too small. Default size of 2px. | content | required |
4 | Text that is being colored. | content | required |
Examples
Inputting the following:
{{color|blue|||This text is blue!}}
Will result in the following:
- This text is blue!
Alternatively, a hex code for a non-html color can be used in order to specify a specific color. For example:
{{color|#1e92bd|||This is a random color!}}
Will result in the following:
- This is a random color!
Or even to add a highlight to a string of text:
This is {{color||yellow||important}} doccumentation.
Which will result in the following:
- This is important doccumentation.
And, it can be used in close conjunction for rapid color changes, and can be placed within one another:
{{color||lightgrey|{{color|red|||R}}{{color|orange|||A}}{{color|yellow|||I}}{{color|green|||N}}{{color|blue|||B}}{{color|indigo|||O}}{{color|violet|||W}}}}
Which will result in the following:
- RAINBOW