From Brotato Wiki

(add pastel variants of green and red, for general text that aren't text (the current green + red look good for stats but for general text they can look a bit abrasive, and the red in particular has poor contrast which has accessibility issues, eg. its almost unreadable on my TV))
(add alias for Gray/Grey)
 
Line 6: Line 6:
  | pastelred  = <span style="color:rgb(191 89 89);">
  | pastelred  = <span style="color:rgb(191 89 89);">
  | cream  = <span style="color:rgb(234,226,176);">
  | cream  = <span style="color:rgb(234,226,176);">
| grey
  | gray    = <span style="color:gray">
  | gray    = <span style="color:gray">
  | tier1  = <span class="colorrarity1">
  | tier1  = <span class="colorrarity1">
Line 13: Line 14:
}}<!--
}}<!--
-->{{{text|{{{2|}}}}}}<!--
-->{{{text|{{{2|}}}}}}<!--
--></span></onlyinclude>
--></span></onlyinclude><noinclude>
<!-- The editor will show a syntax error above, but it *is* valid, the closing span just confuses the parser it off 👍 -->


<!-- NOTE: "{{{color|{{{1|}}}}}}" just lets you use either shortform or longhand -->
<noinclude>
Creates text with the specific color. Makes it possible to easily add/edit coloured text from the visual editor.
Creates text with the specific color. Makes it possible to easily add/edit coloured text from the visual editor.


Line 50: Line 49:
|<code><nowiki>{{Color|color=cream|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=cream|text=TEXT}}</nowiki></code>
|-
|-
|{{Color|gray|Gray}}
|{{Color|gray|Gray / Grey}}
|<code><nowiki>{{Color|gray|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|gray|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=gray|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=grey|text=TEXT}}</nowiki></code>
|-
|-
|{{Color|tier1|Tier 1 (I)}}
|{{Color|tier1|Tier 1 (I)}}

Latest revision as of 05:37, 6 December 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 Stat) {{Color|green|TEXT}} {{Color|color=green|text=TEXT}}
Red (Negative Stat) {{Color|red|TEXT}} {{Color|color=red|text=TEXT}}
Pastel Green (Good Text) {{Color|pastelgreen|TEXT}} {{Color|color=pastelgreen|text=TEXT}}
Pastel Red (Bad Text) {{Color|pastelred|TEXT}} {{Color|color=pastelred|text=TEXT}}
Cream {{Color|cream|TEXT}} {{Color|color=cream|text=TEXT}}
Gray / Grey {{Color|gray|TEXT}} {{Color|color=grey|text=TEXT}}
Tier 1 (I) {{Color|tier1|TEXT}} {{Color|color=tier1|text=TEXT}}
Tier 2 (II) {{Color|tier2|TEXT}} {{Color|color=tier2|text=TEXT}}
Tier 3 (III) {{Color|tier3|TEXT}} {{Color|color=tier3|text=TEXT}}
Tier 4 (IV) {{Color|tier4|TEXT}} {{Color|color=tier4|text=TEXT}}

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Colorcolor 1

Supported: green, red, cream, tier1, tier2, tier3, tier4, pastelgreen, pastelred

Auto value
green
Stringrequired
Texttext 2

no description

Stringrequired