From Brotato Wiki
m (fix TemplateData not including the alsies for 1/2) |
(add section for "All Game Colors") |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude><!-- | <onlyinclude><!-- | ||
-->{{#switch: {{{color|{{{1|}}}}}} | -->{{#switch: {{{color|{{{1|}}}}}} | ||
| green | | green = <span style="color:rgb(0,255,0);"> | ||
| red | | red = <span style="color:rgb(244,0,0);"> | ||
| tier1 | | pastelgreen = <span style="color:rgb(102 185 102);"> | ||
| tier2 | | pastelred = <span style="color:rgb(191 89 89);"> | ||
| tier3 | | cream = <span style="color:rgb(234,226,176);"> | ||
| tier4 | | grey | ||
| gray = <span style="color:gray"> | |||
| tier1 = <span class="colorrarity1"> | |||
| tier2 = <span class="colorrarity2"> | |||
| tier3 = <span class="colorrarity3"> | |||
| tier4 = <span class="colorrarity4"> | |||
| curse = <span style="color: #CA61FF;" class="color-curse"> | |||
| charm = <span style="color: #9BC6DD;" class="color-charm"> | |||
| material = <span style="color: #76FF76;" class="color-material"> | |||
| dlc = <span style="color: #5D6A9F;" class="color-dlc"> | |||
}}<!-- | }}<!-- | ||
-->{{{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 👍 --> | |||
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 25: | 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)}} | |||
|<code><nowiki>{{Color|green|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)}} | |||
|<code><nowiki>{{Color|red|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)}} | |||
|<code><nowiki>{{Color|pastelgreen|TEXT}}</nowiki></code> | |||
|<code><nowiki>{{Color|color=pastelgreen|text=TEXT}}</nowiki></code> | |||
|<code>#66B966</code> | |||
|''n/a'' | |||
|- | |||
|{{Color|pastelred|■ Pastel Red (Bad Text)}} | |||
|<code><nowiki>{{Color|pastelred|TEXT}}</nowiki></code> | |||
|<code><nowiki>{{Color|color=pastelred|text=TEXT}}</nowiki></code> | |||
|<code>#BF5959</code> | |||
|''n/a'' | |||
|- | |||
|{{Color|cream|■ Cream}} | |||
|<code><nowiki>{{Color|cream|TEXT}}</nowiki></code> | |||
|<code><nowiki>{{Color|color=cream|text=TEXT}}</nowiki></code> | |||
|<code>#EAE2B0</code> | |||
|''n/a'' | |||
|- | |||
|{{Color|gray|■ Gray / Grey}} | |||
|<code><nowiki>{{Color|gray|TEXT}}</nowiki></code> | |||
|<code><nowiki>{{Color|color=grey|text=TEXT}}</nowiki></code> | |||
|<code>grey</code> | |||
|''n/a'' | |||
|- | |||
|{{Color|tier1|■ Tier 1 (I)}} | |||
|<code><nowiki>{{Color|tier1|TEXT}}</nowiki></code> | |||
|<code><nowiki>{{Color|color=tier1|text=TEXT}}</nowiki></code> | |||
|<code>#C8C8C8</code> | |||
|''n/a'' | |||
|- | |||
|{{Color|tier2|■ Tier 2 (II)}} | |||
|<code><nowiki>{{Color|tier2|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)}} | |||
|<code><nowiki>{{Color|tier3|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)}} | |||
|<code><nowiki>{{Color|tier4|TEXT}}</nowiki></code> | |||
|<code><nowiki>{{Color|color=tier4|text=TEXT}}</nowiki></code> | |||
|<code>#FF3B3B</code> | |||
|<code>ItemService.TIER_LEGENDARY_COLOR</code> | |||
|- | |||
|{{Color|curse|■ Curse}} | |||
|<code><nowiki>{{Color|curse|TEXT}}</nowiki></code> | |||
|<code><nowiki>{{Color|color=curse|text=TEXT}}</nowiki></code> | |||
|<code>#A30000</code> | |||
|<code>Utils.CURSE_COLOR</code> | |||
|- | |||
|{{Color|charm|■ Charm}} | |||
|<code><nowiki>{{Color|charm|TEXT}}</nowiki></code> | |||
|<code><nowiki>{{Color|color=charm|text=TEXT}}</nowiki></code> | |||
|<code>#9BC6DD</code> | |||
|<code>Utils.CHARM_COLOR</code> | |||
|- | |||
|{{Color|dlc|■ DLC}} | |||
|<code><nowiki>{{Color|dlc|TEXT}}</nowiki></code> | |||
|<code><nowiki>{{Color|color=dlc|text=TEXT}}</nowiki></code> | |||
|<code>#5D6A9F</code> | |||
|''n/a'' | |||
|} | |||
==All Game Colors== | |||
These colors are referenced in the code, but most of them are not currently used on this wiki. | |||
They're listed here in case they're ever needed in the future. | |||
{| | |||
!Color | |||
!Name in the code | |||
|- | |||
|<span style="color: #A30000;">■</span> <code>#A30000</code> | |||
|<code>Utils.BOOST_COLOR</code> | |||
|- | |||
|<span style="color: #CA61FF;">■</span> <code>#CA61FF</code> | |||
|<code>Utils.CURSE_COLOR</code> | |||
|- | |||
|<span style="color: #9BC6DD;">■</span> <code>#9BC6DD</code> | |||
|<code>Utils.CHARM_COLOR</code> | |||
|- | |||
|<span style="color: #BFEBFF;">■</span> <code>#BFEBFF</code> | |||
|<code>Utils.DAMAGE_INC_COLOR</code> | |||
|- | |||
|<span style="color: #72FFF2;">■</span> <code>#72FFF2</code> | |||
|<code>Utils.HIGHLIGHT_COLOR</code> | |||
|- | |||
|<span style="color: #EAE2B0;">■</span> <code>#EAE2B0</code> | |||
|<code>Utils.SECONDARY_FONT_COLOR</code> | |||
|- | |- | ||
|<span style="color: #FAF4CC;">■</span> <code>#FAF4CC</code> | |||
|< | |<code>Utils.CATEGORY_COLOR</code> | ||
|<code> | |||
|- | |- | ||
|<span style="color: #76FF76;">■</span> <code>#76FF76</code> | |||
|< | |<code>Utils.GOLD_COLOR</code> | ||
|<code> | |||
|- | |- | ||
|<span style="color: #555555;">■</span> <code>#555555</code> | |||
|< | |<code>Utils.GRAY_COLOR_STR</code> | ||
|<code> | |||
|- | |- | ||
|<span style="color: #00ff00;">■</span> <code>#00ff00</code> | |||
|< | |<code>Utils.POS_COLOR_STR</code> | ||
|<code> | |||
|- | |- | ||
|<span style="color: red;">■</span> <code>red</code> | |||
|< | |<code>Utils.NEG_COLOR_STR</code> | ||
|<code> | |||
|- | |- | ||
| | |<span style="color: #FFD700;">■</span> <code>#FFD700</code> | ||
|<code>< | |<code>Utils.DLC_BUTTON_TEXT_COLOR</code> | ||
|<code>< | |- | ||
|<span style="color: #D0C142;">■</span> <code>#D0C142</code> | |||
|<code>ItemService.TIER_DANGER_5_COLOR</code> | |||
|- | |||
|<span style="color: #FF773B;">■</span> <code>#FF773B</code> | |||
|<code>ItemService.TIER_DANGER_4_COLOR</code> | |||
|- | |||
|<span style="color: #E6E6E6;">■</span> <code>#E6E6E6</code> | |||
|<code>ItemService.TIER_DANGER_0_COLOR</code> | |||
|- | |||
|<span style="color: #1A1808;">■</span> <code>#1A1808</code> | |||
|<code>ItemService.TIER_DANGER_5_COLOR_DARK</code> | |||
|- | |||
|<span style="color: #241108;">■</span> <code>#241108</code> | |||
|<code>ItemService.TIER_DANGER_4_COLOR_DARK</code> | |||
|- | |||
|<span style="color: #000000;">■</span> <code>#000000</code> | |||
|<code>ItemService.TIER_DANGER_0_COLOR_DARK</code> | |||
|- | |||
|<span style="color: #FF3B3B;">■</span> <code>#FF3B3B</code> | |||
|<code>ItemService.TIER_LEGENDARY_COLOR</code> | |||
|- | |||
|<span style="color: #AD5AFF;">■</span> <code>#AD5AFF</code> | |||
|<code>ItemService.TIER_RARE_COLOR</code> | |||
|- | |||
|<span style="color: #5ABEFF;">■</span> <code>#5ABEFF</code> | |||
|<code>ItemService.TIER_UNCOMMON_COLOR</code> | |||
|- | |||
|<span style="color: #240909;">■</span> <code>#240909</code> | |||
|<code>ItemService.TIER_LEGENDARY_COLOR_DARK</code> | |||
|- | |||
|<span style="color: #100A1B;">■</span> <code>#100A1B</code> | |||
|<code>ItemService.TIER_RARE_COLOR_DARK</code> | |||
|- | |||
|<span style="color: #0F2028;">■</span> <code>#0F2028</code> | |||
|<code>ItemService.TIER_UNCOMMON_COLOR_DARK</code> | |||
|} | |} | ||
<templatedata> | <templatedata> | ||
Line 56: | Line 203: | ||
"color": { | "color": { | ||
"label": "Color", | "label": "Color", | ||
"description": "Supported: green, red, tier1, tier2, tier3, tier4", | "description": "Supported: green, red, cream, tier1, tier2, tier3, tier4, pastelgreen, pastelred, curse", | ||
"type": "string", | "type": "string", | ||
"autovalue": "green", | "autovalue": "green", |
Latest revision as of 11:26, 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 |
All Game Colors
These colors are referenced in the code, but most of them are not currently used on this wiki.
They're listed here in case they're ever needed in the future.
Color | Name in the code |
---|---|
■ #A30000
|
Utils.BOOST_COLOR
|
■ #CA61FF
|
Utils.CURSE_COLOR
|
■ #9BC6DD
|
Utils.CHARM_COLOR
|
■ #BFEBFF
|
Utils.DAMAGE_INC_COLOR
|
■ #72FFF2
|
Utils.HIGHLIGHT_COLOR
|
■ #EAE2B0
|
Utils.SECONDARY_FONT_COLOR
|
■ #FAF4CC
|
Utils.CATEGORY_COLOR
|
■ #76FF76
|
Utils.GOLD_COLOR
|
■ #555555
|
Utils.GRAY_COLOR_STR
|
■ #00ff00
|
Utils.POS_COLOR_STR
|
■ red
|
Utils.NEG_COLOR_STR
|
■ #FFD700
|
Utils.DLC_BUTTON_TEXT_COLOR
|
■ #D0C142
|
ItemService.TIER_DANGER_5_COLOR
|
■ #FF773B
|
ItemService.TIER_DANGER_4_COLOR
|
■ #E6E6E6
|
ItemService.TIER_DANGER_0_COLOR
|
■ #1A1808
|
ItemService.TIER_DANGER_5_COLOR_DARK
|
■ #241108
|
ItemService.TIER_DANGER_4_COLOR_DARK
|
■ #000000
|
ItemService.TIER_DANGER_0_COLOR_DARK
|
■ #FF3B3B
|
ItemService.TIER_LEGENDARY_COLOR
|
■ #AD5AFF
|
ItemService.TIER_RARE_COLOR
|
■ #5ABEFF
|
ItemService.TIER_UNCOMMON_COLOR
|
■ #240909
|
ItemService.TIER_LEGENDARY_COLOR_DARK
|
■ #100A1B
|
ItemService.TIER_RARE_COLOR_DARK
|
■ #0F2028
|
ItemService.TIER_UNCOMMON_COLOR_DARK
|
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Color | color 1 | Supported: green, red, cream, tier1, tier2, tier3, tier4, pastelgreen, pastelred, curse
| String | required |
Text | text 2 | no description | String | required |