How a gradient is built

A gradient from red to blue over the word Hello becomes five separately coloured letters: the first fully red, the last fully blue and the three in between mixed. Spaces don’t get a colour of their own, so a gap doesn’t cause a jump.

That is why gradient output is long. Every character carries a full colour code, and some formats repeat bold or italic codes too.

Choose the format for where the text goes

Where the text is usedFormatExample of one coloured letter
Vanilla /tellraw, /title and similar commandsText component with a color for each part (hex colours since Java Edition 1.16){"text":"H","color":"#FF5555"}
Paper, Velocity and plugins built on AdventureMiniMessage, which has its own gradient tag<gradient:#FF5555:#5555FF>Hello</gradient>
Plugins that document &# hex codesAmpersand hex codes&#FF5555H
Spigot and BungeeCord style configsSection-sign hex codes§x§F§F§5§5§5§5H

Since Java Edition 1.21.5, commands take text components written in SNBT. The quoted, JSON-style form shown above is still valid SNBT, so it can be pasted into a command as it is.

Where gradients don’t work

  • server.properties: the vanilla motd only has the 16 standard colours. The MOTD Generator replaces hex colours with the nearest standard one.
  • Bedrock Edition: it has no hex colours at all.
  • Plugins with a different format: if you see codes like &#FF5555 as plain text in game, the plugin expects another format. Check its documentation.

Making it look good

  • Short text works best. Over a long sentence, neighbouring letters are too similar to notice a gradient.
  • Pick two colours with similar brightness, or one end becomes hard to read on the dark chat background.
  • Check the result on the in-game background. The generator’s preview uses a dark surface like the game’s chat.