From Brotato Wiki

(INITIAL \o/)
 
(→‎Examples: fix table having a white BG)
Line 18: Line 18:
The template uses a basic [https://en.wikipedia.org/wiki/Help:Conditional_expressions#switch switch], so it's easy to add new color options.
The template uses a basic [https://en.wikipedia.org/wiki/Help:Conditional_expressions#switch switch], so it's easy to add new color options.


{| class="wikitable"
==Examples==
 
{| class="wikitable" style="background: transparent; color: #eee;"
|+
|+
!Preview
!style="background-color: rgb(220,220,220,0.2); color: #eee;"| Preview
!Code (Shorthand)
!style="background-color: rgb(220,220,220,0.2); color: #eee;"| Code (Shorthand)
!Code (Longform)
!style="background-color: rgb(220,220,220,0.2); color: #eee;"| Code (Longform)
|-
|-
|{{Color|green|Green (Positive)}}
|{{Color|green|Green (Positive)}}

Revision as of 17:37, 3 November 2022


Creates text with the specific color. Makes it possible to easily add/edit coloured text from the visual editor.

The template uses a basic switch, so it's easy to add new color options.

Examples

Preview Code (Shorthand) Code (Longform)
Green (Positive) {{Color|green|YOUR_TEXT}} {{Color|color=green|text=YOUR_TEXT}}
Red (Negative) {{Color|red|YOUR_TEXT}} {{Color|color=red|text=YOUR_TEXT}}
Tier 1 (I) {{Color|tier1|YOUR_TEXT}} {{Color|color=tier1|text=YOUR_TEXT}}
Tier 2 (II) {{Color|tier2|YOUR_TEXT}} {{Color|color=tier2|text=YOUR_TEXT}}
Tier 3 (III) {{Color|tier3|YOUR_TEXT}} {{Color|color=tier3|text=YOUR_TEXT}}
Tier 4 (IV) {{Color|tier4|YOUR_TEXT}} {{Color|color=tier4|text=YOUR_TEXT}}

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Colorcolor

Supported: green, red, tier1, tier2, tier3, tier4

Auto value
green
Stringrequired
Texttext

no description

Stringrequired