Jump to content

Template:Font color: Difference between revisions

From Fifth Empire Wiki
+pt
m 67 revisions imported from wikipedia:Template:Font_color
 
(29 intermediate revisions by 21 users not shown)
Line 1: Line 1:
{{#if:{{{3|}}}|<span style="background-color:{{{2|inherit}}};color:{{{1|inherit}}};">{{{3|}}}</span>|<span style="color:{{{1|inherit}}};">{{{2|}}}</span>}}<noinclude>
<includeonly>{{ safesubst:#if: {{{text|{{{3|}}}}}}
== Usage ==
| {{ safesubst:#if: {{{link|}}}
'''<nowiki>{{fontcolor|text_color|background_color|text}}</nowiki>'''
      | {{ safesubst:#ifeq: {{{link|}}} | yes
 
      | [[ {{ safesubst:#if:trim | {{{text|{{{3|}}}}}} }}|<span style="background-color:{{ safesubst:#if:trim | {{{bg|{{{2|inherit}}}}}} }}; color:{{ safesubst:#if:trim | {{{fg|{{{1|inherit}}}}}} }};">{{ safesubst:#if:trim | {{{text|{{{3|}}}}}} }}</span>]]
Examples of use:
      | [[{{{link|}}}|<span style="background-color:{{ safesubst:#if:trim | {{{bg|{{{2|inherit}}}}}} }}; color:{{ safesubst:#if:trim | {{{fg|{{{1|inherit}}}}}} }};">{{ safesubst:#if:trim | {{{text|{{{3|}}}}}} }}</span>]]
*'''<nowiki>{{fontcolor|green|this is about plants}}</nowiki>''': {{fontcolor|green|this is about plants}}:(it appears in green text).
      }}
*'''<nowiki>{{fontcolor||red|text in red background}}</nowiki>''': {{fontcolor||red|text in red background}}:(no parameters are used for the text color, only for the [[background]])
    | <span style="background-color:{{ safesubst:#if:trim | {{{bg|{{{2|inherit}}}}}} }}; color:{{ safesubst:#if:trim | {{{fg|{{{1|inherit}}}}}} }};">{{ safesubst:#if:trim | {{{text|{{{3|}}}}}} }}</span>
*'''<nowiki>{{fontcolor|red|yellow|red text with yellow background}}</nowiki>''': {{fontcolor|red|yellow|red text with yellow background}}
    }}
== See also ==
| {{ safesubst:#if: {{{link|}}}
* [[HTML color names]]
      | {{ safesubst:#ifeq: {{{link|}}} | yes
* [[List of colors]]
      | [[ {{ safesubst:#if:trim | {{{bg|{{{2|}}}}}} }} |<span style="color:{{ safesubst:#if:trim | {{{fg|{{{1|inherit}}}}}} }};">{{ safesubst:#if:trim | {{{bg|{{{2|}}}}}} }}</span>]]
 
      | [[ {{ safesubst:#if:trim | {{{link|}}} }} |<span style="color:{{ safesubst:#if:trim | {{{fg|{{{1|inherit}}}}}} }};">{{ safesubst:#if:trim | {{{bg|{{{2|}}}}}} }}</span>]]
[[Category:Formatting templates|{{PAGENAME}}]]
    }}
[[pt:Predefinição:Fontcolor]]
  | <span style="color:{{ safesubst:#if:trim | {{{fg|{{{1|inherit}}}}}} }};">{{ safesubst:#if:trim | {{{bg|{{{2|}}}}}} }}</span>
[[zh:Template:Fontcolor]]
  }}
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 20:49, 24 January 2026