Template:Format
Jump to navigation
Jump to search
Syntax
Allows text to be formatted using Minecraft's formatting codes.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| code | 1 | The formatting code or its associated name
| String | optional |
| text | 2 | The text to be formatted
| String | required |
| spacing | 3 | Specifying anything in this parameter removes all padding and spacing
| String | optional |
Usage
Type {{Format|d|Silly}} to obtain Silly.
See Minecraft Wiki's
formatting codes page for a list of valid formatting codes, the source code of this page for valid aliases, and the notes below for special cases.
The first parameter is case-insensitive; in cases where it is or invalid or unspecified, this template yields the unformatted text of the second parameter.
Notes
- For bold,
strikethrough, underlined, and italic formatting, it is probably still best to respectively use'''bold''',<s>strikethrough</s>,<u>underlined</u>, and''italic''; they are only included in this template for the sake of completeness. - The formatting code
k, which yields the obfuscated/magical text in-game, does not currently have an effect that works as intended with this template. - Where Java Edition and Bedrock Edition yield different results for the same one-character code, the Java Edition variant is prioritized (other options are given to access the Bedrock Edition variants, as desribed below).
- Most formatting options are most easily accessed by specifying a singular character as the first parameter, as listed on Minecraft Wiki's
formatting codes page; there are five exceptions to this, however:
- As an alternative to the formatting code
6, a brown colour based on the one commonly used in the 1981 Color Graphics Adapter can be accessed by usingbrownas the first parameter. - As another alternative to the formatting code
6, a dark yellow colour based on the unchanged variant of the above colour can be accessed usingdark_yellowas the first parameter. - Since the specific shade of grey produced by the formatting code
7is different in Java Edition and Bedrock Edition, the one from the latter can be accessed usingbedrock_greyas the first parameter. - Since the formatting code
mis used forstrikethrough textin Java Edition and redstone-coloured text in Bedrock Edition, the latter can be accessed usingredstoneas the first parameter. - Since the formatting code
nis used for underlined text in Java Edition and copper-coloured text in Bedrock Edition, the latter can be accessed usingcopperas the first parameter.
- As an alternative to the formatting code
- The third parameter of this template is mainly useful in situations where the individual letters of a word, phrase, or sentence are being formatted; in cases like this, one should still wrap the text in the following tags to prevent the characters from bleeding off the page or into each other:
<span style="letter-spacing: 1px;padding-left: 1px">SEQUENCE OF CHARACTERS INDIVIDUALLY FORMATTED WITH THIS TEMPLATE GOES HERE</span>.