Template:Fontcolor/doc: Difference between revisions
Jump to navigation
Jump to search
dnd5efandom>Foxwells No edit summary |
m (1 revision imported) |
(No difference)
| |
Latest revision as of 20:49, 9 June 2019
| File:Edit-copy green.svg | This is a {{#switch: Template | Template = template | Module = module | user = user page | #default = page }} documentation subpage for Template:Fontcolor. It contains usage information, categories, and other content that is not part of the original {{#if: | {{{text2}}} | {{ #if: | {{{text1}}} | {{ #ifeq: Template | User | template template page | {{ #if: Template | template page|article}}}}}}}}. |
[[Category:{{#switch: Template | Template = Template | Module = Module | User = User | #default = Page }} documentation]]
- Description
- This template is used to make a simple way to change background and text color.
- Syntax
{{ #if: |}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if: Color of text
| |Color of text }}{{ #if: Text
| |Text }}{{ #if:
| |{{{4}}} }}{{ #if:
| |{{{5}}} }}{{ #if:
| |{{{6}}} }}{{ #if:
| |{{{7}}} }}{{ #if:
| |{{{8}}} }}{{ #if:
| |{{{9}}} }}{{ #if:
| |{{{10}}} }}{{ #if:
| |{{{11}}} }}{{ #if:
| |{{{12}}} }}{{ #if:
| |{{{13}}} }}{{ #if:
| |{{{14}}} }}{{ #if:
| |{{{15}}} }}{{ #if:
| |{{{16}}} }}{{ #if:
| |{{{17}}} }}{{ #if:
| |{{{18}}} }}{{ #if:
| |{{{19}}} }}{{ #if:
| |{{{20}}} }}{{ #if:
| |{{{21}}} }}}}{{ #if: | }} is how to change text color.
- Example
{{ #if: |}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if: blue
| |blue }}{{ #if: Text in blue!
| |Text in blue! }}{{ #if:
| |{{{4}}} }}{{ #if:
| |{{{5}}} }}{{ #if:
| |{{{6}}} }}{{ #if:
| |{{{7}}} }}{{ #if:
| |{{{8}}} }}{{ #if:
| |{{{9}}} }}{{ #if:
| |{{{10}}} }}{{ #if:
| |{{{11}}} }}{{ #if:
| |{{{12}}} }}{{ #if:
| |{{{13}}} }}{{ #if:
| |{{{14}}} }}{{ #if:
| |{{{15}}} }}{{ #if:
| |{{{16}}} }}{{ #if:
| |{{{17}}} }}{{ #if:
| |{{{18}}} }}{{ #if:
| |{{{19}}} }}{{ #if:
| |{{{20}}} }}{{ #if:
| |{{{21}}} }}}}{{ #if: | }} gives... {{ #if: | {{{3}}} | Text in blue! }}
- Changing background color
{{ #if: |}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if:
(Note: there are 2 pipes (|) after {{ #if: || | }}{{ #if: Background color | |Background color }}{{ #if: text | |text }}{{ #if: | |{{{5}}} }}{{ #if: | |{{{6}}} }}{{ #if: | |{{{7}}} }}{{ #if: | |{{{8}}} }}{{ #if: | |{{{9}}} }}{{ #if: | |{{{10}}} }}{{ #if: | |{{{11}}} }}{{ #if: | |{{{12}}} }}{{ #if: | |{{{13}}} }}{{ #if: | |{{{14}}} }}{{ #if: | |{{{15}}} }}{{ #if: | |{{{16}}} }}{{ #if: | |{{{17}}} }}{{ #if: | |{{{18}}} }}{{ #if: | |{{{19}}} }}{{ #if: | |{{{20}}} }}{{ #if: | |{{{21}}} }}}}{{ #if: |}}}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if: | |{{{2}}} }}{{ #if: | |{{{3}}} }}{{ #if: | |{{{4}}} }}{{ #if: | |{{{5}}} }}{{ #if: | |{{{6}}} }}{{ #if: | |{{{7}}} }}{{ #if: | |{{{8}}} }}{{ #if: | |{{{9}}} }}{{ #if: | |{{{10}}} }}{{ #if: | |{{{11}}} }}{{ #if: | |{{{12}}} }}{{ #if: | |{{{13}}} }}{{ #if: | |{{{14}}} }}{{ #if: | |{{{15}}} }}{{ #if: | |{{{16}}} }}{{ #if: | |{{{17}}} }}{{ #if: | |{{{18}}} }}{{ #if: | |{{{19}}} }}{{ #if: | |{{{20}}} }}{{ #if: | |{{{21}}} }}}}{{ #if: |}})
- Example
{{ #if: |}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if:
| | }}{{ #if: red
| |red }}{{ #if: Remember to put 2 | after {{ #if: | }}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if:
| |{{{2}}} }}{{ #if:
| |{{{3}}} }}{{ #if:
| |{{{4}}} }}{{ #if:
| |{{{5}}} }}{{ #if:
| |{{{6}}} }}{{ #if:
| |{{{7}}} }}{{ #if:
| |{{{8}}} }}{{ #if:
| |{{{9}}} }}{{ #if:
| |{{{10}}} }}{{ #if:
| |{{{11}}} }}{{ #if:
| |{{{12}}} }}{{ #if:
| |{{{13}}} }}{{ #if:
| |{{{14}}} }}{{ #if:
| |{{{15}}} }}{{ #if:
| |{{{16}}} }}{{ #if:
| |{{{17}}} }}{{ #if:
| |{{{18}}} }}{{ #if:
| |{{{19}}} }}{{ #if:
| |{{{20}}} }}{{ #if:
| |{{{21}}} }}}}{{ #if: | }}
| |Remember to put 2 | after {{ #if: | }}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if:
| |{{{2}}} }}{{ #if:
| |{{{3}}} }}{{ #if:
| |{{{4}}} }}{{ #if:
| |{{{5}}} }}{{ #if:
| |{{{6}}} }}{{ #if:
| |{{{7}}} }}{{ #if:
| |{{{8}}} }}{{ #if:
| |{{{9}}} }}{{ #if:
| |{{{10}}} }}{{ #if:
| |{{{11}}} }}{{ #if:
| |{{{12}}} }}{{ #if:
| |{{{13}}} }}{{ #if:
| |{{{14}}} }}{{ #if:
| |{{{15}}} }}{{ #if:
| |{{{16}}} }}{{ #if:
| |{{{17}}} }}{{ #if:
| |{{{18}}} }}{{ #if:
| |{{{19}}} }}{{ #if:
| |{{{20}}} }}{{ #if:
| |{{{21}}} }}}}{{ #if: | }} }}{{ #if:
| |{{{5}}} }}{{ #if:
| |{{{6}}} }}{{ #if:
| |{{{7}}} }}{{ #if:
| |{{{8}}} }}{{ #if:
| |{{{9}}} }}{{ #if:
| |{{{10}}} }}{{ #if:
| |{{{11}}} }}{{ #if:
| |{{{12}}} }}{{ #if:
| |{{{13}}} }}{{ #if:
| |{{{14}}} }}{{ #if:
| |{{{15}}} }}{{ #if:
| |{{{16}}} }}{{ #if:
| |{{{17}}} }}{{ #if:
| |{{{18}}} }}{{ #if:
| |{{{19}}} }}{{ #if:
| |{{{20}}} }}{{ #if:
| |{{{21}}} }}}}{{ #if: | }} gives...
- <span style="{{ #if: Remember to put 2 | after {{ #if: |
}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if:
- <span style="{{ #if: Remember to put 2 | after {{ #if: |
| |{{{2}}} }}{{ #if: | |{{{3}}} }}{{ #if: | |{{{4}}} }}{{ #if: | |{{{5}}} }}{{ #if: | |{{{6}}} }}{{ #if: | |{{{7}}} }}{{ #if: | |{{{8}}} }}{{ #if: | |{{{9}}} }}{{ #if: | |{{{10}}} }}{{ #if: | |{{{11}}} }}{{ #if: | |{{{12}}} }}{{ #if: | |{{{13}}} }}{{ #if: | |{{{14}}} }}{{ #if: | |{{{15}}} }}{{ #if: | |{{{16}}} }}{{ #if: | |{{{17}}} }}{{ #if: | |{{{18}}} }}{{ #if: | |{{{19}}} }}{{ #if: | |{{{20}}} }}{{ #if: | |{{{21}}} }}}}{{ #if: |}} | background-color: {{ #if: red | red | inherit }}; }} color: {{ #if: | | inherit }};">{{ #if: Remember to put 2 | after {{ #if: |}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if: | |{{{2}}} }}{{ #if: | |{{{3}}} }}{{ #if: | |{{{4}}} }}{{ #if: | |{{{5}}} }}{{ #if: | |{{{6}}} }}{{ #if: | |{{{7}}} }}{{ #if: | |{{{8}}} }}{{ #if: | |{{{9}}} }}{{ #if: | |{{{10}}} }}{{ #if: | |{{{11}}} }}{{ #if: | |{{{12}}} }}{{ #if: | |{{{13}}} }}{{ #if: | |{{{14}}} }}{{ #if: | |{{{15}}} }}{{ #if: | |{{{16}}} }}{{ #if: | |{{{17}}} }}{{ #if: | |{{{18}}} }}{{ #if: | |{{{19}}} }}{{ #if: | |{{{20}}} }}{{ #if: | |{{{21}}} }}}}{{ #if: |}} | Remember to put 2 | after {{ #if: |}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if: | |{{{2}}} }}{{ #if: | |{{{3}}} }}{{ #if: | |{{{4}}} }}{{ #if: | |{{{5}}} }}{{ #if: | |{{{6}}} }}{{ #if: | |{{{7}}} }}{{ #if: | |{{{8}}} }}{{ #if: | |{{{9}}} }}{{ #if: | |{{{10}}} }}{{ #if: | |{{{11}}} }}{{ #if: | |{{{12}}} }}{{ #if: | |{{{13}}} }}{{ #if: | |{{{14}}} }}{{ #if: | |{{{15}}} }}{{ #if: | |{{{16}}} }}{{ #if: | |{{{17}}} }}{{ #if: | |{{{18}}} }}{{ #if: | |{{{19}}} }}{{ #if: | |{{{20}}} }}{{ #if: | |{{{21}}} }}}}{{ #if: |}} | red }}
- Background and text color
{{ #if: |}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if: Color of text
| |Color of text }}{{ #if: Color of background
| |Color of background }}{{ #if:
| |{{{4}}} }}{{ #if:
| |{{{5}}} }}{{ #if:
| |{{{6}}} }}{{ #if:
| |{{{7}}} }}{{ #if:
| |{{{8}}} }}{{ #if:
| |{{{9}}} }}{{ #if:
| |{{{10}}} }}{{ #if:
| |{{{11}}} }}{{ #if:
| |{{{12}}} }}{{ #if:
| |{{{13}}} }}{{ #if:
| |{{{14}}} }}{{ #if:
| |{{{15}}} }}{{ #if:
| |{{{16}}} }}{{ #if:
| |{{{17}}} }}{{ #if:
| |{{{18}}} }}{{ #if:
| |{{{19}}} }}{{ #if:
| |{{{20}}} }}{{ #if:
| |{{{21}}} }}}}{{ #if: | }}
- Example
{{ #if: |}}{{{{ #if: | {{{prefix}}}: }}[[{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : || {{ #if: || Template }} }}:Fontcolor|{{ #ifeq: {{ #sub: Fontcolor | 0 | 1 }} | : | : }}{{ #ifeq: | Template | Fontcolor | Fontcolor }}]]{{ #if: blue
| |blue }}{{ #if: yellow
| |yellow }}{{ #if: WOW, the text is blue and the background is yellow!
| |WOW, the text is blue and the background is yellow! }}{{ #if:
| |{{{5}}} }}{{ #if:
| |{{{6}}} }}{{ #if:
| |{{{7}}} }}{{ #if:
| |{{{8}}} }}{{ #if:
| |{{{9}}} }}{{ #if:
| |{{{10}}} }}{{ #if:
| |{{{11}}} }}{{ #if:
| |{{{12}}} }}{{ #if:
| |{{{13}}} }}{{ #if:
| |{{{14}}} }}{{ #if:
| |{{{15}}} }}{{ #if:
| |{{{16}}} }}{{ #if:
| |{{{17}}} }}{{ #if:
| |{{{18}}} }}{{ #if:
| |{{{19}}} }}{{ #if:
| |{{{20}}} }}{{ #if:
| |{{{21}}} }}}}{{ #if: | }} gives..
- {{ #if: WOW, the text is blue and the background is yellow! | WOW, the text is blue and the background is yellow! | yellow }}
- Colors
- These are the 16 main colors.
Color Hexadecimal Code Color Hexadecimal Code black #000000 silver #c0c0c0 gray #808080 white #ffffff maroon #800000 red #ff0000 purple #800080 fuchsia #ff00ff green #008000 lime #00ff00 olive #808000 yellow #ffff00 navy #000080 blue #0000ff teal #008080 aqua #00ffff