Skip to content

Minecraft MOTD colours, hex codes and gradients

The MOTD is the two-line text under your server name in the multiplayer list, and it is the first thing players read about you. This guide explains which colours work where: the 16 classic codes in server.properties, real hex colours and gradients through Velocity or a MOTD plugin, plus line breaks, centring and the escaping that keeps the § sign from breaking.

Updated:

Where the MOTD is set

Which file you edit depends on what answers the server list ping:

SetupWhere the MOTD goesColours
Vanilla, Spigot, Paper without pluginmotd= in server.properties16 classic colours and formats
Velocity proxymotd in velocity.tomlMiniMessage, including hex and gradients
BungeeCord proxymotd under listeners in config.yml& codes; for hex use a MOTD plugin
MOTD pluginThe plugin's configWhatever format the plugin documents

On a network, players see the proxy's MOTD. The server.properties of the backend servers behind it is not shown in the list.

The 16 classic colour codes

Every Minecraft version understands these codes. In server.properties they start with the section sign §, in most plugin configs with &.

CodeColourCodeColour
§0black #000000§8dark_gray #555555
§1dark_blue #0000AA§9blue #5555FF
§2dark_green #00AA00§agreen #55FF55
§3dark_aqua #00AAAA§baqua #55FFFF
§4dark_red #AA0000§cred #FF5555
§5dark_purple #AA00AA§dlight_purple #FF55FF
§6gold #FFAA00§eyellow #FFFF55
§7gray #AAAAAA§fwhite #FFFFFF

Formats: §l bold, §o italic, §n underlined, §m strikethrough, §k obfuscated and §r reset. Put the colour first and the format after it, because a new colour code resets the formatting.

Step by step: a two-line MOTD in server.properties

  1. Stop the server and open server.properties in the main folder.
  2. Find the line starting with motd=. The default is A Minecraft Server.
  3. Replace it with your text. \n starts the second line, and every § is written as \u00A7.
  4. Save the file and start the server again. The file is read on start, so a reload is not enough.
server.properties
motd=\u00A7a\u00A7lPixel Realm \u00A77| \u00A7fSurvival\n\u00A7eNew season every month!

server.properties is a Java properties file, and in that format \n means a line break and \u00A7 is the § character written as a Unicode escape. The escape works whatever encoding your editor or host panel uses. Since Minecraft 1.20 the file is read as UTF-8 with Latin-1 as fallback; on older versions a raw § saved as UTF-8 turns into §.

The Minecraft Wiki warns that a MOTD longer than 59 characters may make the server list report a communication error. If you see that error, shorten the text.

Hex colours and gradients

Since Java Edition 1.16 the server list can show any RGB colour. Vanilla server.properties still only knows the 16 classic codes, so a hex colour there is not possible. For real hex and gradients you need something that sends them: a Velocity proxy or a MOTD plugin.

Velocity reads the MOTD as MiniMessage only. Its default is <#09add3>A Velocity Server. A gradient over the server name with a second line looks like this:

velocity.toml
motd = "<gradient:#55ff55:#00aaff><bold>Pixel Realm</bold></gradient><newline><yellow>New season every month!"
  • <#55ff55> or <color:#55ff55> sets one hex colour.
  • <gradient:#55ff55:#00aaff>…</gradient> blends from the first to the last colour, letter by letter. More colours are allowed.
  • <rainbow> runs through the rainbow.
  • <bold>, <italic> and <reset> work like the classic formats. <newline> (or <br>) starts the second line.

Many MOTD plugins read MiniMessage too, others expect hex in another notation. The MOTD Generator exports MiniMessage and a hex code variant (&x&r&r&g&g&b&b), so check which one your plugin documents.

Centring and line width

Minecraft has no centre setting. A centred MOTD is padded with spaces in front of the text. Because letters have different widths (an i is narrow, a W is wide, bold adds a pixel per letter), counting characters does not work. You have to count pixels.

Lines that are too wide are cut off at the end. The MOTD Generator measures each line in font pixels, marks the limit at about 270 pixels and works out the right number of spaces when you tick "Center line 1" or "Center line 2".

Small caps like ᴘɪxᴇʟ ʀᴇᴀʟᴍ are separate Unicode letters, not a font, so they also work in server.properties. Save the file as UTF-8 if you paste them in directly.

Common MOTD errors and fixes

What you seeCause and fix
§ or odd symbolsA raw § was saved in the wrong encoding. Write \u00A7 instead.
The second line is on the first\n is missing, or a plugin expects <newline> or a list of lines instead.
Hex colours look like other coloursHex in server.properties is rounded or ignored. Use Velocity or a MOTD plugin.
MiniMessage tags show as textThe place you pasted it does not read MiniMessage, for example vanilla server.properties.
Nothing changedserver.properties is read on start. Restart, then press Refresh in the server list.
The MOTD is ignored on a networkSet it on the proxy, not on the backend servers.
The end of a line is missingThe line is too wide. Shorten it or drop bold.

Your MOTD shares the row with the server icon. If that icon is missing, see server icon not showing. For server lists and websites, an animated server banner carries the same colours further.

Frequently asked questions

Can I use hex colours in server.properties?

No. Vanilla server.properties only knows the 16 classic colour codes. For hex colours and gradients use a Velocity proxy with MiniMessage or a MOTD plugin.

How do I make a two-line MOTD?

In server.properties write \n between the lines. In MiniMessage, for example in velocity.toml, use <newline>.

Why does my MOTD show §?

The § sign was saved with a different encoding than the server reads. Write it as \u00A7, which works with any encoding.

How do I centre a MOTD?

With spaces in front of the text. There is no centre option, and letters differ in width, so let a tool count the pixels for you.

Sources

Checked against the official documentation: