Jump to content

Template:Co/doc: Difference between revisions

From ModEnc²
en>桂月August
Doc to introduce this template.
 
m 6 revisions imported
 
(5 intermediate revisions by one other user not shown)
Line 4: Line 4:
</pre>
</pre>
Copy-paste the code above and replace
Copy-paste the code above and replace
* '''text''' with the text you want to have colored</li><li>'''color''' with the color the text should have
* '''text''' with the text you want to have colored
* '''color''' with the color the text should have
* '''background-color''' with the bg-color the text should have (can be left blank)
* '''background-color''' with the bg-color the text should have (can be left blank)


==Examples==
==Examples==
;Code
<pre>
<pre>
{{Co|Yellow text|gold}}
{{Co|Gold text|gold}}
 
{{Co|Green text with a red background|#00FF00|red}}
 
{{Color|Grayish-green text with a red background|green|red}}
</pre>
</pre>
Creates {{Co|Gold text|gold}}.
;Result
{{Co|Gold text|gold}}


<pre>
{{Co|Green text with a red background|#00FF00|red}}
{{Co|Green text with a red background|#00FF00|red}}
</pre>
 
Creates {{Co|Green text with a red background|#00FF00|red}}.
{{Color|Grayish-green text with a red background|green|red}}
 
* Mind that '''{{color block|#00FF00}}<code>#00FF00</code> and {{color block|green}}<code>green</code> are diffrent in our wiki'''.
 
==See also==
{{tl|color block}}

Latest revision as of 22:20, 31 March 2025

Usage:

{{Co|text|color|background-color}}

Copy-paste the code above and replace

  • text with the text you want to have colored
  • color with the color the text should have
  • background-color with the bg-color the text should have (can be left blank)

Examples

Code
{{Co|Gold text|gold}}

{{Co|Green text with a red background|#00FF00|red}}

{{Color|Grayish-green text with a red background|green|red}}
Result

Gold text

Green text with a red background

Grayish-green text with a red background

  • Mind that #00FF00 and green are diffrent in our wiki.

See also

{{color block}}