Please remember to make use of the Manual of Style and Code of Conduct during your stay.

 Actions

Template

Difference between revisions of "ColorCodes"

From Dragon Mania Legends (DML) Wiki

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": "wiki-page-name",
+
"type": "string",
 
"required": true
 
"required": true
 
},
 
},
Line 116: Line 118:
 
}
 
}
 
},
 
},
"description": "This template returns the color code for the given type. 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 template colors. To get the Border color, the second parameter must be set.",
+
"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>
  
[[Category:Design templates]]
+
<!----
 +
{|
 +
| {{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.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Type1

The type of Element/Rarity/Event to fetch the color code for.

Example
Plant, Epic, Collection
Stringrequired
dark?2

If this parameter is set, the darker colors for the type is returned.

Default
false
Example
true
Booleanoptional

Examples

{{ColorCodes|Fire}} CE4421
{{ColorCodes|Fire|true}} 9E2810
{{EvColor|{{ColorCodes|Fire}} }}    
{{EvColor|{{ColorCodes|Primal}} }}    
{{EvColor|{{ColorCodes|Epic|dark}} }}    
{{EvColor|{{ColorCodes|Treasure Hunt}} }}