From Brotato Wiki

(Add "DLC" color, for an upcoming DLC link template)
(Docs: add extra columns, to show hex codes and code names)
Line 32: Line 32:
!style="background-color: rgb(220,220,220,0.2); color: #eee;"| Code (Shorthand)
!style="background-color: rgb(220,220,220,0.2); color: #eee;"| Code (Shorthand)
!style="background-color: rgb(220,220,220,0.2); color: #eee;"| Code (Longform)
!style="background-color: rgb(220,220,220,0.2); color: #eee;"| Code (Longform)
!style="background-color: rgb(220,220,220,0.2); color: #eee;"| Hex
!style="background-color: rgb(220,220,220,0.2); color: #eee;"| Name in the code
|-
|-
|{{Color|green|■ Green (Positive Stat)}}
|{{Color|green|■ Green (Positive Stat)}}
|<code><nowiki>{{Color|green|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|green|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=green|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=green|text=TEXT}}</nowiki></code>
|<code>#00FF00</code>
|<code>Utils.POS_COLOR_STR</code>
|-
|-
|{{Color|red|■ Red (Negative Stat)}}
|{{Color|red|■ Red (Negative Stat)}}
|<code><nowiki>{{Color|red|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|red|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=red|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=red|text=TEXT}}</nowiki></code>
|<code>red</code>
|<code>Utils.NEG_COLOR_STR</code>
|-
|-
|{{Color|pastelgreen|■ Pastel Green (Good Text)}}
|{{Color|pastelgreen|■ Pastel Green (Good Text)}}
|<code><nowiki>{{Color|pastelgreen|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|pastelgreen|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=pastelgreen|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=pastelgreen|text=TEXT}}</nowiki></code>
|<code>#66B966</code>
|<code>''n/a''</code>
|-
|-
|{{Color|pastelred|■ Pastel Red (Bad Text)}}
|{{Color|pastelred|■ Pastel Red (Bad Text)}}
|<code><nowiki>{{Color|pastelred|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|pastelred|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=pastelred|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=pastelred|text=TEXT}}</nowiki></code>
|<code>#BF5959</code>
|<code>''n/a''</code>
|-
|-
|{{Color|cream|■ Cream}}
|{{Color|cream|■ Cream}}
|<code><nowiki>{{Color|cream|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|cream|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=cream|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=cream|text=TEXT}}</nowiki></code>
|<code>#EAE2B0</code>
|<code>''n/a''</code>
|-
|-
|{{Color|gray|■ Gray / Grey}}
|{{Color|gray|■ Gray / Grey}}
|<code><nowiki>{{Color|gray|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|gray|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=grey|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=grey|text=TEXT}}</nowiki></code>
|<code>grey</code>
|<code>''n/a''</code>
|-
|-
|{{Color|tier1|■ Tier 1 (I)}}
|{{Color|tier1|■ Tier 1 (I)}}
|<code><nowiki>{{Color|tier1|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|tier1|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=tier1|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=tier1|text=TEXT}}</nowiki></code>
|<code>#C8C8C8</code>
|<code>''n/a''</code>
|-
|-
|{{Color|tier2|■ Tier 2 (II)}}
|{{Color|tier2|■ Tier 2 (II)}}
|<code><nowiki>{{Color|tier2|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|tier2|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=tier2|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=tier2|text=TEXT}}</nowiki></code>
|<code>#4A9BD1</code>
|<code>ItemService.TIER_UNCOMMON_COLOR</code>
|-
|-
|{{Color|tier3|■ Tier 3 (III)}}
|{{Color|tier3|■ Tier 3 (III)}}
|<code><nowiki>{{Color|tier3|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|tier3|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=tier3|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=tier3|text=TEXT}}</nowiki></code>
|<code>#AD5AFF</code>
|<code>ItemService.TIER_RARE_COLOR</code>
|-
|-
|{{Color|tier4|■ Tier 4 (IV)}}
|{{Color|tier4|■ Tier 4 (IV)}}
|<code><nowiki>{{Color|tier4|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|tier4|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=tier4|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=tier4|text=TEXT}}</nowiki></code>
|<code>#FF3B3B</code>
|<code>ItemService.TIER_LEGENDARY_COLOR</code>
|-
|-
|{{Color|curse|■ Curse}}
|{{Color|curse|■ Curse}}
|<code><nowiki>{{Color|curse|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|curse|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=curse|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=curse|text=TEXT}}</nowiki></code>
|<code>#A30000</code>
|<code>Utils.CURSE_COLOR</code>
|-
|-
|{{Color|charm|■ Charm}}
|{{Color|charm|■ Charm}}
|<code><nowiki>{{Color|charm|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|charm|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=charm|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=charm|text=TEXT}}</nowiki></code>
|<code>#9BC6DD</code>
|<code>Utils.CHARM_COLOR</code>
|-
|-
|{{Color|dlc|■ DLC}}
|{{Color|dlc|■ DLC}}
|<code><nowiki>{{Color|dlc|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|dlc|TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=dlc|text=TEXT}}</nowiki></code>
|<code><nowiki>{{Color|color=dlc|text=TEXT}}</nowiki></code>
|<code>#5D6A9F</code>
|<code>''n/a''</code>
|}
|}



Revision as of 11:18, 6 November 2024

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) Hex Name in the code
■ Green (Positive Stat) {{Color|green|TEXT}} {{Color|color=green|text=TEXT}} #00FF00 Utils.POS_COLOR_STR
■ Red (Negative Stat) {{Color|red|TEXT}} {{Color|color=red|text=TEXT}} red Utils.NEG_COLOR_STR
■ Pastel Green (Good Text) {{Color|pastelgreen|TEXT}} {{Color|color=pastelgreen|text=TEXT}} #66B966 n/a
■ Pastel Red (Bad Text) {{Color|pastelred|TEXT}} {{Color|color=pastelred|text=TEXT}} #BF5959 n/a
■ Cream {{Color|cream|TEXT}} {{Color|color=cream|text=TEXT}} #EAE2B0 n/a
■ Gray / Grey {{Color|gray|TEXT}} {{Color|color=grey|text=TEXT}} grey n/a
■ Tier 1 (I) {{Color|tier1|TEXT}} {{Color|color=tier1|text=TEXT}} #C8C8C8 n/a
■ Tier 2 (II) {{Color|tier2|TEXT}} {{Color|color=tier2|text=TEXT}} #4A9BD1 ItemService.TIER_UNCOMMON_COLOR
■ Tier 3 (III) {{Color|tier3|TEXT}} {{Color|color=tier3|text=TEXT}} #AD5AFF ItemService.TIER_RARE_COLOR
■ Tier 4 (IV) {{Color|tier4|TEXT}} {{Color|color=tier4|text=TEXT}} #FF3B3B ItemService.TIER_LEGENDARY_COLOR
■ Curse {{Color|curse|TEXT}} {{Color|color=curse|text=TEXT}} #A30000 Utils.CURSE_COLOR
■ Charm {{Color|charm|TEXT}} {{Color|color=charm|text=TEXT}} #9BC6DD Utils.CHARM_COLOR
■ DLC {{Color|dlc|TEXT}} {{Color|color=dlc|text=TEXT}} #5D6A9F n/a

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Colorcolor 1

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

Auto value
green
Stringrequired
Texttext 2

no description

Stringrequired