Template:Fc: Difference between revisions

From Step Mods | Change The Game
No edit summary
 
(44 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly><span class="{{#switch:{{lc:{{{1|}}}}}
<includeonly><span class="{{#switch:{{lc:{{{1|}}}}}
| red | warn | warning = redtx
| salmon | instruction | heading | note | notice = salmontx
| orange = orangetx
| yellow | issue = yellowtx
| chartr | bug = chartrtx
| green = greentx
| blue = bluetx
| purple | dev = purpletx
| magenta = magenttx
| magenta = magenttx
| purple = purpletx
| important | highlight | bright | brighter = hltx
| addition | enhancement | confirmation | notice | blue = bluetx
| dim | dimmer = dimtx
| added | fix | functional | relevant | green = greentx
| #default = }}">{{{text|{{{2|}}}}}}</span></includeonly><noinclude>__NOTOC__ [[Category:Formatting Templates]][https://stepmodifications.org/forum/topic/9769-font-color/ '''Forum Topic''']
| chartreuse = chartrtx
| issue | unknown | yellow = yellowtx
| instruction | ilheading | salmon = salmontx
| change | merged | modification | updated | orange = orangetx
| dropped | removal | replaced | non-functional | warning | irrelevant | red = redtx
| important | highlight = hltxt
| #default = hltxt}}">{{{2}}}</span></includeonly><noinclude>__NOTOC__ [[Category:Formatting Templates]]


==Purpose & Usage==
==Purpose & Usage==
Use this template to change text color. The following key words specify the situation in which to use text colors and the respective colors used; if none of the key words are appropriate for what you are highlighting, the template accepts all [https://www.w3schools.com/cssref/css_colors_legal.asp CSS Legal Color Values]. Bad key words result in no effect on text color, and the default text color will result.
This template is used to change text color in accordance with the [[Project:SiteColorPallet|site color pallet]]. Deviation from this template using inline styling or other means is not recommended.
{{Alert|text=Always use a 'named' second parameter (text) when using this template to color text that includes an equal ('=') symbol to avoid parser errors.}}


<!--{{Alert|type=Notice|text=It is highly recommended to only use colors from the table below!}}-->
=== Required Parameters ===
This template uses 'anonymous' and optionally 'named' parameters, and all are required and must appear in a particular order.


{| class="wikitable"
<span class="salmontx">'''First Prameter - color'''</span> - Sets the color of text
: '''Values'''
:: See Color Table
 
<span class="salmontx">'''Second Prameter - text'''</span> - Sets the text to be colored
: '''Values'''
:: Free text (this parameter can also be 'named' if the text to be colored includes an equal ('=') symbol)
 
=== Optional Parameters ===
Not applicable.
 
== Color Table ==
The following is a table of the colors supported by the Step Wiki to maintain compatibility with site themes and colors. See the [[Project:SiteColorPallet|Site Color Usage]] for more in-depth information regarding the use of colors, including their Hex and CSS values, which will be useful for any custom development on user pages, theming, etc.
 
{| class="wikitable mb-5"
|-
|-
! Key Words
! class="text-left" | Key Words (first parameter)
! class="text-left" | Usage
|-
|-
| {{Project:Template:Fc|magenta|magenta}}
| {{Template:Fc|red|red, warn, warning}}
| Warning text without an "Alert" template, dropped mods, required elements, etc.
|-
|-
| {{Project:Template:Fc|purple|purple}}
| {{Template:Fc|salmon|salmon, instruction, heading, note, notice}}
| Should be the most prevalent "callout" text color for notes and special instructions. Preferred over [[:Template:AlertSmall]]
|-
|-
| {{Project:Template:Fc|blue|addition, enhancement, confirmation, blue}}
| {{Template:Fc|orange|orange}}
| Call attention to changes such as updates or file moves, etc.
|-
|-
| {{Project:Template:Fc|green|fix, functional, relevant, green}}
| {{Template:Fc|yellow|yellow, issue}}
| Call attention to issues, etc.
|-
|-
| {{Project:Template:Fc|chartreuse|chartreuse}}
| {{Template:Fc|chartr|chartr, bug}}
| Chartreuse text; can represent 'bug' notes, etc.
|-
|-
| {{Project:Template:Fc|yellow|issue, unknown, yellow}}
| {{Template:Fc|green|green}}
| Green text
|-
|-
| {{Project:Template:Fc|salmon|instruction, ilheading{{Project:Template:Fc|highlight|<sup>1</sup>}}, salmon}}
| {{Template:Fc|blue|blue}}
| Use sparingly. {{fc|warning|''Do not use for {{fc|blue|short phases}} as it can resemble {{fc|blue|links}}.''}}
|-
|-
| {{Project:Template:Fc|orange|change, modification, orange}}
| {{Template:Fc|purple|purple, dev, development}}
| Call out development, etc.
|-
|-
| {{Project:Template:Fc|red|removal, non-functional, irrelevant, warning, red}}
| {{Template:Fc|magenta|magenta}}
| Magenta text.
|-
|-
| {{Project:Template:Fc|highlight|important, highlight}}
| {{Template:Fc|highlight|highlight, important, bright, brighter}}
| Secondary emphasis within normal text (salmon preferred), instructions, and notes
|-
|-
| colspan="2" | {{Project:Template:Fc|highlight|<sup>1</sup>}}{{Fs|.8em|Only use this for "inline headings," which begin a paragraph instead of being on their own line.}}
| {{Template:Fc|dim|dim, dimmer}}
| Subtle text used for de-emphasis
|}
|}


==Examples==
==Examples==
===Default Call===
No applicable (all parameters must be specified)
===Fully Specified===
'''Code:'''
'''Code:'''
<pre>The {{Template:Fc|important|important part}} of an {{Template:Fc|instruction|instruction}} is highlighted.</pre>
<pre>{{Fc|instruction|The {{Fc|highlight|important part}} of an instruction is highlighted.}}</pre>
'''Result:'''
'''Result:''' {{Fc|instruction|The {{Fc|highlight|important part}} of an instruction is highlighted.}}
The {{Template:Fc|important|important part}} of an {{Template:Fc|instruction|instruction}} is highlighted.
 
<hr class="my-5">


'''Code:'''
'''Code:'''
<pre>{{Template:Fc|nonsense|Bad key words}} don't affect text color.</pre>
<pre>{{Fc|green|text=Use the ''text'' parameter when "=" characters are used.}}</pre>
'''Result:'''
'''Result:''' {{Fc|green|text=Use the ''text'' parameter when "=" characters are used.}}
{{Template:Fc|nonsense|Bad key words}} don't affect text color.
 
<hr class="my-5">
 
'''Code:'''
<pre>{{Fc|nonsense|Undefined parameter key words}} don't affect text color.</pre>
'''Result:''' {{Fc|nonsense|Undefined parameter key words}} don't affect text color.


== See Also ==
== See Also ==
[[:Template:Fs]]<br />
[[:Template:Fs]]<br>
[[:Template:Indicator]]
[[Project:SiteColorPallet|Site Color Usage]]
 
</noinclude>
</noinclude>

Latest revision as of 19:57, September 22, 2021

Forum Topic

Purpose & Usage[edit source]

This template is used to change text color in accordance with the site color pallet. Deviation from this template using inline styling or other means is not recommended.

Info-Logo.png

NOTE

Always use a 'named' second parameter (text) when using this template to color text that includes an equal ('=') symbol to avoid parser errors.

Required Parameters[edit source]

This template uses 'anonymous' and optionally 'named' parameters, and all are required and must appear in a particular order.

First Prameter - color - Sets the color of text

Values
See Color Table

Second Prameter - text - Sets the text to be colored

Values
Free text (this parameter can also be 'named' if the text to be colored includes an equal ('=') symbol)

Optional Parameters[edit source]

Not applicable.

Color Table[edit source]

The following is a table of the colors supported by the Step Wiki to maintain compatibility with site themes and colors. See the Site Color Usage for more in-depth information regarding the use of colors, including their Hex and CSS values, which will be useful for any custom development on user pages, theming, etc.

Key Words (first parameter) Usage
red, warn, warning Warning text without an "Alert" template, dropped mods, required elements, etc.
salmon, instruction, heading, note, notice Should be the most prevalent "callout" text color for notes and special instructions. Preferred over Template:AlertSmall
orange Call attention to changes such as updates or file moves, etc.
yellow, issue Call attention to issues, etc.
chartr, bug Chartreuse text; can represent 'bug' notes, etc.
green Green text
blue Use sparingly. Do not use for short phases as it can resemble links.
purple, dev, development Call out development, etc.
magenta Magenta text.
highlight, important, bright, brighter Secondary emphasis within normal text (salmon preferred), instructions, and notes
dim, dimmer Subtle text used for de-emphasis

Examples[edit source]

Default Call[edit source]

No applicable (all parameters must be specified)

Fully Specified[edit source]

Code:

{{Fc|instruction|The {{Fc|highlight|important part}} of an instruction is highlighted.}}

Result: The important part of an instruction is highlighted.


Code:

{{Fc|green|text=Use the ''text'' parameter when "=" characters are used.}}

Result: Use the text parameter when "=" characters are used.


Code:

{{Fc|nonsense|Undefined parameter key words}} don't affect text color.

Result: Undefined parameter key words don't affect text color.

See Also[edit source]

Template:Fs
Site Color Usage