Template:Color/doc: Difference between revisions

From Destiny Wiki
Jump to navigation Jump to search
mNo edit summary
(added doccumentation for text highlight)
Line 3: Line 3:


== Useage ==
== Useage ==
To be used to color text.  
To be used to color text, or the background of text.
<pre>{{color|1|2}}</pre>
<pre>{{color|1|2|3}}</pre>


<pre>{{color|color to change|text you are coloring}}</pre>
<pre>{{color|text color|background color|text you are coloring}}</pre>


== Parameters ==
== Parameters ==
Line 13: Line 13:
! 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 || required
{{!}} 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 || Text that is being colored. || content || required
|}
|}


Line 21: Line 23:
Inputting the following:
Inputting the following:


:<nowiki>{{color|Blue|This text is blue!}}</nowiki>
:<nowiki>{{color|blue||This text is blue!}}</nowiki>


Will result in the following:
Will result in the following:


:{{color|Blue|This text is blue!}}
:{{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|#abcdef|This is a random color!}}</nowiki>
:<nowiki>{{color|#abcdef||This is a random color!}}</nowiki>


Will result in the following:
Will result in the following:


:{{color|#abcdef|This is a random color!}}
:{{color|#abcdef||This is a random color!}}
----
----
And, it can be used in close conjunction for rapid color changes:
And, it can be used in close conjunction for rapid color changes:
Line 41: Line 43:
Which will result in the following:
Which will result in the following:


:{{color|red|Red}} and {{color|orange|Orange}}
:{{color|red||Red}} and {{color|orange||Orange}}
----
Or even to add a highlight to a string of text:
 
:<nowiki>This is {{color||yellow|important}} doccumentation.</nowiki>
 
Which will result in the following:
 
:This is {{color||yellow|important}} doccumentation.

Revision as of 18:22, 19 March 2024

Documentation for Template:Color

Useage

To be used to color text, or the background of text.

{{color|1|2|3}}
{{color|text color|background color|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 Text that is being colored. content required

Examples

Inputting the following:

{{color|blue||This text is blue!}}

Will result in the following:

{{{4}}}

Alternatively, a hex code for a non-html color can be used in order to specify a specific color. For example:

{{color|#abcdef||This is a random color!}}

Will result in the following:

{{{4}}}

And, it can be used in close conjunction for rapid color changes:

{{color|red|Red}} and {{color|orange|Orange}}

Which will result in the following:

{{{4}}} and {{{4}}}

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 {{{4}}} doccumentation.