1

This question already has an answer here:

Recently, I have seen item names on servers and on this very website with odd characters preceding them. I was thinking "well, this changes everything!".

Can you make item name act like JSON text using this method? (i.e. any colour, bold, italic, obfuscated?)

Please list methods/preceders below.


Edit

What I am looking for is the colour of the item names, not sign block data or written books with coloured text. For example, when you go on a server, you often see items with coloured or obfuscated names.

marked as duplicate by galacticninja, greg-449, Schism, Joachim, Ivo Coumans Jul 22 at 6:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @pppery Isn't the answer here more comprehensive? – Joachim Jul 21 at 7:18
  • 1
    @Joachim No, the answer here is outdated as of 1.13, whereas I posted an answer that was updated to 1.13 syntax to the older question. – pppery Jul 21 at 13:21
5

You can use a sign to run a command containing the section symbol (disguised as unicode \u00A7 because the actual "§" character cannot be typed in a command block), which formats the item's display name as desired. The following provides the player with a sign that, when right-clicked, provides the player with a stone that has an obfuscated name:

/give @p minecraft:sign 1 0 {BlockEntityTag:{Text1:"{\"text\":\"\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/give @p minecraft:stone 1 0 {display:{Name:\\\"\u00A7r\u00A7kThis text is obfuscated.\\\"}}\"}}"}}

The formatting is reset first since it would otherwise be italic by default.

  • Thanks! Do you know any other formats or ways to separate sections in the name? – Chemical Comrade Nov 30 '16 at 4:50
  • If this has fixed it for you can you mark it as an awnser for this kind person! – Jcraft153 Dec 1 '16 at 8:41
3

It is currently not possible (as of version 1.11) to colour the names of items using colour/formatting codes without the use of mods.

You can, however, use the formatting codes in conjunction with the § character to colour the text in books and quills.

A reference of all the colour/formatting codes can be found below:

+-------+------------------+
| Code  |      Effect      |
+-------+------------------+
| §0    | Black            |
| §1    | Dark Blue        |
| §2    | Dark Green       |
| §3    | Dark Aqua        |
| §4    | Dark Red         |
| §5    | Dark Purple      |
| §6    | Gold             |
| §7    | Gray             |
| §8    | Dark Gray        |
| §9    | Blue             |
| §a    | Green            |
| §b    | Aqua             |
| §c    | Red              |
| §d    | Light Purple     |
| §e    | Yellow           |
| §f    | White            |
+-------+------------------+
| §k    | Obfuscated       |
| §l    | Bold             |
| §m    | Strikethrough    |
| §n    | Underline        |
| §o    | Italic           |
| §r    | Reset formatting |
+-------+------------------+

Codes sourced from Minecraft Wiki

  • This is awesome in combination with @Skylinerw 's answer. I would give the tick to both if I could. Thanks guys! – Chemical Comrade Aug 10 '17 at 6:51
1

@FungusKing I would recommend using link as it will automatically generate signs, tellraws, books, etc. All you have to do is fill out the required fields.

  • Oh that's odd. It removed the name. It's called "Minecraft JSON". It's a website that generates a /give command that will give you a sign with the colors, bolds, strikethroughs, etc. that you fill out. It also works with /tellraw /execute and other Minecraft commands that use the JSON format. – KompriZe Dec 2 '16 at 2:42
0

There is a way to /give colored items in 1.12.2 (at least in spigot)

If you're a server administrator, you can spawn colored title items by using the § character in the console. You are able to write, or copy-paste this into the console. The windows alt-code is Alt-0167 (not sure about apple, sorry).

E.g. (from console) give @p diamondsword 1 0 {display:{Name:"§cThis sword's name is light red!"}}

Not the answer you're looking for? Browse other questions tagged or ask your own question.