Template:Fc: Difference between revisions
m (→Color Table) |
m (→Color Table) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><span class="{{#switch:{{lc:{{{1|}}}}} | <includeonly><span class="{{#switch:{{lc:{{{1|}}}}} | ||
| red | warning | | red | warn | warning = redtx | ||
| salmon | instruction | heading = salmontx | | salmon | instruction | heading | note | notice = salmontx | ||
| orange = orangetx | | orange = orangetx | ||
| yellow | issue = yellowtx | | yellow | issue = yellowtx | ||
| chartr | bug = chartrtx | | chartr | bug = chartrtx | ||
| green = greentx | | green = greentx | ||
| blue | | blue = bluetx | ||
| purple | dev = purpletx | | purple | dev = purpletx | ||
| magenta = magenttx | | magenta = magenttx | ||
| important | highlight | brighter = hltx | | important | highlight | bright | brighter = hltx | ||
| dimmer | | dim | dimmer = dimtx | ||
| #default = }}">{{{text|{{{2|}}}}}}</span></includeonly><noinclude>__NOTOC__ [[Category:Formatting Templates]][https://stepmodifications.org/forum/topic/9769-font-color/ '''Forum Topic'''] | | #default = }}">{{{text|{{{2|}}}}}}</span></includeonly><noinclude>__NOTOC__ [[Category:Formatting Templates]][https://stepmodifications.org/forum/topic/9769-font-color/ '''Forum Topic'''] | ||
==Purpose & Usage== | ==Purpose & Usage== | ||
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. | 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.}} | |||
=== Required Parameters === | === Required Parameters === | ||
This template uses 'anonymous' parameters, | This template uses 'anonymous' and optionally 'named' parameters, and all are required and must appear in a particular order. | ||
<span class="salmontx">'''First Prameter - color'''</span> - Sets the color of text | <span class="salmontx">'''First Prameter - color'''</span> - Sets the color of text | ||
Line 25: | Line 26: | ||
<span class="salmontx">'''Second Prameter - text'''</span> - Sets the text to be colored | <span class="salmontx">'''Second Prameter - text'''</span> - Sets the text to be colored | ||
: '''Values''' | : '''Values''' | ||
:: Free text | :: Free text (this parameter can also be 'named' if the text to be colored includes an equal ('=') symbol) | ||
=== Optional Parameters === | === Optional Parameters === | ||
Line 35: | Line 36: | ||
{| class="wikitable mb-5" | {| class="wikitable mb-5" | ||
|- | |- | ||
! class="text-left" | | ! class="text-left" | Key Words (first parameter) | ||
! class="text-left" | Usage | ! class="text-left" | Usage | ||
|- | |- | ||
| {{Template:Fc|red|red, warning}} | | {{Template:Fc|red|red, warn, warning}} | ||
| Warning text without an "Alert" template, dropped mods, required elements, etc. | | Warning text without an "Alert" template, dropped mods, required elements, etc. | ||
|- | |- | ||
| {{Template:Fc|salmon|salmon, instruction, heading}} | | {{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]] | ||
|- | |- | ||
| {{Template:Fc|orange|orange}} | | {{Template:Fc|orange|orange}} | ||
Line 51: | Line 52: | ||
|- | |- | ||
| {{Template:Fc|chartr|chartr, bug}} | | {{Template:Fc|chartr|chartr, bug}} | ||
| | | Chartreuse text; can represent 'bug' notes, etc. | ||
|- | |- | ||
| {{Template:Fc|green|green}} | | {{Template:Fc|green|green}} | ||
| | | Green text | ||
|- | |- | ||
| {{Template:Fc|blue|blue | | {{Template:Fc|blue|blue}} | ||
| | | Use sparingly. {{fc|warning|''Do not use for {{fc|blue|short phases}} as it can resemble {{fc|blue|links}}.''}} | ||
|- | |- | ||
| {{Template:Fc|purple|purple, dev}} | | {{Template:Fc|purple|purple, dev, development}} | ||
| Call out development, etc. | | Call out development, etc. | ||
|- | |- | ||
| {{Template:Fc|magenta|magenta}} | | {{Template:Fc|magenta|magenta}} | ||
| | | Magenta text. | ||
|- | |- | ||
| {{Template:Fc|highlight|highlight, important, brighter}} | | {{Template:Fc|highlight|highlight, important, bright, brighter}} | ||
| | | Secondary emphasis within normal text (salmon preferred), instructions, and notes | ||
|- | |- | ||
| {{Template:Fc| | | {{Template:Fc|dim|dim, dimmer}} | ||
| | | Subtle text used for de-emphasis | ||
|} | |} | ||
Line 84: | Line 85: | ||
'''Code:''' | '''Code:''' | ||
<pre>{{Fc| | <pre>{{Fc|green|text=Use the ''text'' parameter when "=" characters are used.}}</pre> | ||
'''Result:''' {{Fc| | '''Result:''' {{Fc|green|text=Use the ''text'' parameter when "=" characters are used.}} | ||
<hr class="my-5"> | <hr class="my-5"> | ||
'''Code:''' | '''Code:''' | ||
<pre>{{Fc|nonsense| | <pre>{{Fc|nonsense|Undefined parameter key words}} don't affect text color.</pre> | ||
'''Result:''' {{Fc|nonsense| | '''Result:''' {{Fc|nonsense|Undefined parameter key words}} don't affect text color. | ||
== See Also == | == See Also == | ||
[[:Template:Fs]]<br> | [[:Template:Fs]]<br> | ||
[[Project:SiteColorPallet|Site Color | [[Project:SiteColorPallet|Site Color Usage]] | ||
</noinclude> | </noinclude> |
Latest revision as of 19:57, September 22, 2021
Purpose & Usage
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.
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
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
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 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
Default Call
No applicable (all parameters must be specified)
Fully Specified
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.