Difference between revisions of "ColorCodes"
From Dragon Mania Legends (DML) Wiki
CrystalClear (talk | contribs) m |
m (Treasure hunt added; more usages in examples) |
||
Line 45: | Line 45: | ||
---->|Dragon Board|Dragon Dice=89f0d4<!-- | ---->|Dragon Board|Dragon Dice=89f0d4<!-- | ||
---->|Chest Opening=f071e8<!-- | ---->|Chest Opening=f071e8<!-- | ||
+ | ---->|Treasure Hunt=c7b256<!-- | ||
--->|#default=000000<!-- | --->|#default=000000<!-- | ||
--->}}<!-- | --->}}<!-- | ||
Line 94: | Line 95: | ||
---->|Chest Opening=C441bC<!-- | ---->|Chest Opening=C441bC<!-- | ||
---->|Cake Craze=2369fa<!-- | ---->|Cake Craze=2369fa<!-- | ||
+ | ---->|Treasure Hunt=966818<!-- | ||
--->|#default=8D8883<!-- | --->|#default=8D8883<!-- | ||
--->}}<!-- | --->}}<!-- | ||
Line 105: | Line 107: | ||
"description": "The type of Element/Rarity/Event to fetch the color code for.", | "description": "The type of Element/Rarity/Event to fetch the color code for.", | ||
"example": "Plant, Epic, Collection", | "example": "Plant, Epic, Collection", | ||
− | "type": " | + | "type": "string", |
"required": true | "required": true | ||
}, | }, | ||
Line 116: | Line 118: | ||
} | } | ||
}, | }, | ||
− | "description": "This template returns the color code for the | + | "description": "This template contains ALL colors used in this wiki that are mapped to Elements/Events/Rarities/whatever. It returns the color code for the provided Parameter, without any leading \"#\". E.g. \"959595\" for \"Metal\" or \"5F9EA0\" for \"Arcade\". Can be used in combination with the {evColor} template and gets used itself by the {EventBox/BackgroundColor} and many other color templates. To get the Border color, the second parameter must be set.", |
"format": "inline" | "format": "inline" | ||
} | } | ||
Line 127: | Line 129: | ||
<code><nowiki>{{EvColor|{{ColorCodes|Primal}} }}</nowiki></code> {{EvColor|{{ColorCodes|Primal}} }}<br> | <code><nowiki>{{EvColor|{{ColorCodes|Primal}} }}</nowiki></code> {{EvColor|{{ColorCodes|Primal}} }}<br> | ||
<code><nowiki>{{EvColor|{{ColorCodes|Epic|dark}} }}</nowiki></code> {{EvColor|{{ColorCodes|Epic|dark}} }}<br> | <code><nowiki>{{EvColor|{{ColorCodes|Epic|dark}} }}</nowiki></code> {{EvColor|{{ColorCodes|Epic|dark}} }}<br> | ||
+ | <code><nowiki>{{EvColor|{{ColorCodes|Treasure Hunt}} }}</nowiki></code> {{EvColor|{{ColorCodes|Treasure Hunt}} }}<br> | ||
− | + | <!---- | |
+ | {| | ||
+ | | {{EventTemplateEntry|Milestone Rewards}} | ||
+ | |- | ||
+ | |{{EventTemplateEntry|Treasure Hunt}} | ||
+ | |- | ||
+ | |{{EventTemplateEntry|Gold Collecting}} | ||
+ | |} | ||
+ | ---> | ||
+ | {{elements}} | ||
{{types}} | {{types}} | ||
+ | {{events}} | ||
+ | |||
+ | [[Category:Design templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 11:23, 4 March 2022
This template contains ALL colors used in this wiki that are mapped to Elements/Events/Rarities/whatever. It returns the color code for the provided Parameter, without any leading "#". E.g. "959595" for "Metal" or "5F9EA0" for "Arcade". Can be used in combination with the {evColor} template and gets used itself by the {EventBox/BackgroundColor} and many other color templates. To get the Border color, the second parameter must be set.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type | 1 | The type of Element/Rarity/Event to fetch the color code for.
| String | required |
dark? | 2 | If this parameter is set, the darker colors for the type is returned.
| Boolean | optional |
Examples
{{ColorCodes|Fire}}
CE4421
{{ColorCodes|Fire|true}}
9E2810
{{EvColor|{{ColorCodes|Fire}} }}
{{EvColor|{{ColorCodes|Primal}} }}
{{EvColor|{{ColorCodes|Epic|dark}} }}
{{EvColor|{{ColorCodes|Treasure Hunt}} }}